查询一个表内相同纪录

select * from 表 where ID in (select ID from 表 group by ID having sum(1)>1)

编程技巧