Created
March 5, 2021 07:51
-
-
Save edubskiy/587c5d6de844b3be8135a8780f0f5ad8 to your computer and use it in GitHub Desktop.
How to find duplicate records in 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 yourTable ou | |
where (select count(*) from yourTable inr | |
where inr.sid = ou.sid) > 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment