How to detect duplicate rows in a SQL Server table?

前端 未结 5 623
渐次进展
渐次进展 2021-02-02 07:03

What is the most efficient way to detect duplicates in a 10 column / 50K row table? I\'m using MSSQL 8.0

5条回答
  •  面向向阳花
    2021-02-02 07:14

    Try this

    Select * From Table
    Group By [List all fields in the Table here]
    Having Count(*) > 1
    

提交回复
热议问题