 |
How to delete all rows from all tables in a SQL Server database? - Stack Overflow
How to delete all rows from all tables in a SQL Server database? ... Set nocount on Exec sp_MSForEachTable 'Alter Table ? NoCheck Constraint All' Exec sp_MSForEachTable ' If ObjectProperty(Object_ID(''?''), ''TableHasForeignRef'')=1 Begin -- Just to know
stackoverflow.com |
 |