Enable Disable All The Constraints Of Data Base Sql Server
Join the DZone community and get the full member experience.Join For Free
// enable disable all the constraints of data base sql server
---For ENABLING EXEC sp_MSforeachtable @command1="ALTER TABLE ? NOCHECK CONSTRAINT ALL" ---To DISABLE all the constraints EXEC sp_MSforeachtable @command1="ALTER TABLE ? CHECK CONSTRAINT ALL" GO
Opinions expressed by DZone contributors are their own.