Share Dot Net Experience
Pages
Home
ADO.NET
C#.Net
VB.Net
SQL Server
Interview Question and Answer
.Net Framework and Tools
OOPS
Entity Framework
SQL SERVER – Disable All the Foreign Key Constraint in Database – Enable All the Foreign Key Constraint in Database
-- Disable all the constraint in database
EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all"
-- Enable all the constraint in database
EXEC sp_msforeachtable "ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all"
Refer this link
Newer Post
Older Post
Home