This is a very simple and small stored procedure which will help you identify repeated rows on any given table. This is specially useful for situations when you want to clean up a table and add a primary key on it, but you cannot until all duplication is eliminated. Only two parameter are necessary; table name and column name.
Harnessing SQL Server Metadata- Disabling and Rebuilding Indexes
When doing bulk data changes it may be beneficial to disable indexes prior to starting the operation. Fortunately, SQL's rich metadata makes this very easy to automate in a robust fashion.
2018-05-18 (first published: 2015-10-19)
4,855 reads