SELECT YourColumn, COUNT(*) TotalCount
FROM YourTable
GROUP BY YourColumn
HAVING COUNT(*) > 1
ORDER BY COUNT(*) DESC
http://blog.sqlauthority.com/2007/07/11/sql-server-count-duplicate-records-rows/
SELECT YourColumn, COUNT(*) TotalCount
FROM YourTable
GROUP BY YourColumn
HAVING COUNT(*) > 1
ORDER BY COUNT(*) DESC
http://blog.sqlauthority.com/2007/07/11/sql-server-count-duplicate-records-rows/
转载于:https://www.cnblogs.com/joe-yang/p/3418153.html