Posted in 面试题 onJuly 13, 2013
delete from table_name where rowid not in (select max(rowid) from table_name group by duplicate_values_field_name);
或者
delete duplicate_values_field_name dv from table_name ta where rowid 或者
DELETE FROM table_name A WHERE rowid>(SELECT MIN(rowid) FROM table_name B WHERE A>key_values=B.key_values);
或者
delete duplicate_values_field_name dv from table_name ta where rowid 或者
DELETE FROM table_name A WHERE rowid>(SELECT MIN(rowid) FROM table_name B WHERE A>key_values=B.key_values);
如何删除一个表里面的重复行
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Tags in this post...
Reply on: @reply_date@
@reply_contents@