选出相同记录的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)