SQL query to get duplicate values in a column?

I am wondering what should be the easiest way to write an SQL query which can return duplicate values of a column?

Sumbal Gee Junior Programmer Asked on November 23, 2015 in Databases.
Add Comment
1 Answer(s)


FROM table-name

GROUP BY column-name

HAVING COUNT(column-name) > 1

Above SQL query will return those rows having duplicate values in column-name along with their count.

PTI Junior Programmer Answered on November 23, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.