Thursday, March 10, 2011

SQL Import Data - Disable and Enable Constraints

Disable

EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all"


Enable

exec sp_msforeachtable @command1="print '?'", @command2="ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all"

Check This Out!

More Links to Good Information