this question has answer here:
- how can remove duplicate rows? 35 answers
this table structure have duplicate entry define duplicate date (time stamp in seconds) how can delete using sql query ?
database name db_misc table name t_cmd_logs
lid user message date addeddate
here data:
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
- i apologize, weak in english.
i found 1 way copy t_cmd_logs data t_cmd_log have run every 1 minute have delete data t_cmd_logs
after copy there thing possible have used
insert t_cmd_log select * t_cmd_logs 1 group user,message,date ; delete t_cmd_logs;
but in phpmyadmin sql gives me error doing wrong ? please me
if want delete row , know addeddate;
delete your_table your_date_column = '2009-01-01';
Comments
Post a Comment