使用rowId进行重复记录的过滤判断
delete from 表名 a
where a.rowid !=
(
select max(b.rowid) from 表名 b
where a.字段1 = b.字段1
and a.字段2 = b.字段2
and a.....
)
注意字段中不能含空,因为null=null 返回false 那结果集就是空的了
使用rowId进行重复记录的过滤判断
delete from 表名 a
where a.rowid !=
(
select max(b.rowid) from 表名 b
where a.字段1 = b.字段1
and a.字段2 = b.字段2
and a.....
)
注意字段中不能含空,因为null=null 返回false 那结果集就是空的了