Created
May 12, 2015 10:16
-
-
Save haythamdouaihy/682d7c808933bc7704d0 to your computer and use it in GitHub Desktop.
SQL- rows having duplicate column value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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