Php 如何使用sql查询删除MySQL中的重复行?
这是我的表结构我有重复的条目我将按日期定义重复时间戳以秒为单位我如何使用sql查询删除 数据库名称db_misc表名称t_cmd_日志Php 如何使用sql查询删除MySQL中的重复行?,php,mysql,phpmyadmin,duplicates,navicat,Php,Mysql,Phpmyadmin,Duplicates,Navicat,这是我的表结构我有重复的条目我将按日期定义重复时间戳以秒为单位我如何使用sql查询删除 数据库名称db_misc表名称t_cmd_日志 lid user message date addedDate 以下是我的数据: lid user message date addedDate 5 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08
lid user message date addedDate
以下是我的数据:
lid user message date addedDate
5 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08-08 17:24:01
6 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08-08 17:25:01
7 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08-08 17:26:01
8 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08-08 17:27:02
9 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08-08 17:28:01
10 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08-08 17:29:01
11 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08-08 17:30:01
12 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08-08 17:31:01
13 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08-08 17:32:01
14 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08-08 17:33:01
15 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08-08 17:34:01
16 DarkScorpion -jjjj 2016-08-08 17:23:24 2016-08-08 17:35:01
但是在phpmyadmin中,sql给了我错误,我做错了吗?
如果您想删除一行,并且您知道添加的日期,请帮助我
delete from YOUR_TABLE where your_date_column = '2009-01-01';
插入时阻止重复比事后修复更容易这就是您要查找的内容?您对问题的描述-按日期时间戳复制以秒为单位-显然与列列表不匹配。
delete from YOUR_TABLE where your_date_column = '2009-01-01';