Last active
March 31, 2022 11:20
-
-
Save ridakk/3204c0bafecc6744c49f4e1bb01be8ab to your computer and use it in GitHub Desktop.
sql-find-duplicate-rows
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 ( | |
| SELECT id, | |
| ROW_NUMBER() OVER(PARTITION BY <column>, <column> ORDER BY id asc) AS Row | |
| FROM <table_name> | |
| ) dups | |
| where | |
| dups.Row > 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment