Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SQL- rows having duplicate column value
-- query that returns duplicate colum value
select
count(<duplicated_column_name>),
<duplicated_column_name>,
<other>
from
<table_name>
group by
<duplicated_column_name>
HAVING
count(<duplicated_column_name>)>1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment