-
-
Save softMaina/6e2312e9c5108590952e8018d53b51c7 to your computer and use it in GitHub Desktop.
How to find duplicate values with PostgreSQL
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
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