17,086
社区成员
发帖
与我相关
我的任务
分享
delete from table a where (a.entityTypeId,a.targetEntityTypeId) in (select entityTypeId,targetEntityTypeId from table group by entityTypeId,targetEntityTypeId having count(*) > 1) and rowid not in (select min(rowid) from table group by entityTypeId,targetEntityTypeId having count(*)>1)