Created
August 12, 2016 12:17
-
-
Save ramiroaznar/f23236b7284c823b2fa5692d6fc4c1f6 to your computer and use it in GitHub Desktop.
How to find duplicate values with PostgreSQL
This file contains hidden or 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
select * from table t1 | |
where (select count(*) from table t2 | |
where t1.field = t2.field) > 1 | |
order by field |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
well done