1、如何查询重复的记录,并取出指定的记录?
select * from Table1 t1 where id in (select max(id) from Table1 t2 where t1.id=t2.id)
2、如何删除记录中重复的数据?
delete from Table1 where id not in (select id from Table1 t1 where id in (select max(id) from Table1 t2 where t1.id=t2.id))