DELETE
FROM TableA
WHERE sid in (SELECT sid
FROM TableA as A, (select sname , min(sid) ID_min from tableA group by sname having count(sname)>1 ) as B
WHERE A.sname=B.sname and A.sid !=B.ID_min) ;
SQL 删除属性重复的记录
最新推荐文章于 2024-01-22 10:52:17 发布