-
-
Save anhnguyenkim-agilityio/25a76215983e07a3b5d8cc2f8146f234 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