如何用sql 查找两个字段重复的记录,并列出重复记录 - ykhi时间:2024-03-07 18:47:53 select * from 表名 a join (select ID,NAME from 表名 group by ID,NAME having count(*)>1) b on a.ID=b.ID and a.NAME=b.NAME order by a.NAME ,a.ID ID和NAME是要查询的重复字段