读书人

剔除表中重复记录

发布时间: 2012-08-24 10:00:21 作者: rapoo

删除表中重复记录

delete from table1 where (a1) in    (select a1 from table1 group by a1 having count(*) >1)     and rowid not in(select min(rowid)from table1 group by a1     having count(*) >1);
?

读书人网 >其他数据库

热点推荐