Language: SQL
Disable/Enable All constraint
-- Disable All constraint (FK) EXECUTE sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT ALL" GO -- Enable EXECUTE sp_msforeachtable "ALTER TABLE ? WITH CHECK CHECK CONSTRAINT ALL" GO
Tags:
Description:
Disable or enable All constraint for all table in sql server db
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search

