Skip to content

Instantly share code, notes, and snippets.

@joshi-kumar
Created February 17, 2018 11:38
Show Gist options
  • Save joshi-kumar/9bdb1b2eb0a45e1382a2111831802b03 to your computer and use it in GitHub Desktop.
Save joshi-kumar/9bdb1b2eb0a45e1382a2111831802b03 to your computer and use it in GitHub Desktop.
Delete duplicate record from table in SQL
delete FROM dbo.GenrePreference WHERE id NOT IN (SELECT MIN(id) _
FROM dbo.GenrePreference GROUP BY CategoryId)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment