如下所示: 这样怎么样: SELECT COUNT(*), A, B, C, D FROM dbo.YourTable GROUP BY A, B, C, D -- optional - if you want to skip all the rows that occur only once -- HAVING COUNT(*) > 1 基本上,你只需按感兴趣的列对数据进行分组,然后让 SQL 统计与每组列值匹配的行数。