Skip to content

Instantly share code, notes, and snippets.

@ridakk
Last active March 31, 2022 11:20
Show Gist options
  • Select an option

  • Save ridakk/3204c0bafecc6744c49f4e1bb01be8ab to your computer and use it in GitHub Desktop.

Select an option

Save ridakk/3204c0bafecc6744c49f4e1bb01be8ab to your computer and use it in GitHub Desktop.
sql-find-duplicate-rows
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