Posts Tagged: Reset Identity

This is a SQL Script that Cleans your Database Records & resets Identity Columns, and it is all in 6 lines! /*Disable Constraints & Triggers*/ exec sp_MSforeachtable ‘ALTER TABLE ? NOCHECK CONSTRAINT ALL’ exec sp_MSforeachtable ‘ALTER TABLE ? DISABLE TRIGGER ALL’ /*Perform delete operation on all table for cleanup*/ exec sp_MSforeachtable ‘DELETE ?’ /*Enable Constraints… Read Article →

Scroll To Top