原创

删除重复,只留有rowid最小的记录

delete from 资产佛山未对应上人员ok1 where 用户id in
(select 用户id from 资产佛山未对应上人员ok1 group by 用户id having count(用户id) > 1)
and rowid not in (select min(rowid) from 资产佛山未对应上人员ok1 group by 用户id having count(用户id )>1)

正文到此结束
本文目录