How to delete and reseed all data in a SQL Server database
If you want to delete all data in a SQL Server database and reseed the tables that contain a identity column, you can use the following code: exec sp_msforeachtable "alter table ? nocheck constraint all";