选出相同记录的SQL语句是:
select * from tableName where id in (
select id from tableName group by id having count(*) > 1)
删除表中相同的记录中的一条
Delete from table where id not in (select Max(id) from @ Group by sName)
select * from tableName where id in (
select id from tableName group by id having count(*) > 1)
删除表中相同的记录中的一条
Delete from table where id not in (select Max(id) from @ Group by sName)
SQL去重与删除重复记录

被折叠的 条评论
为什么被折叠?



