Code in the oven
Friday, July 20, 2012
Get duplicates records in SQL
What are we cooking today?
A query to count duplicates
SELECT
ColumnX
,
COUNT
(*) as
TotalCount
FROM
TableY
GROUP BY
ColumnX
HAVING
COUNT
(*) >
1
ORDER BY
COUNT
(*)
DESC
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment