In one of the articles , we explained How to Disable All Constraints in the Database temporarily in SQL Server ? , let’s look at the option of how to enable back the constraints in the SQL Server Database.
How to Enable All Constraints back in the Database in SQL Server ?
Below is a sample query that enables all the constraints back to the database in SQL Server.
Use ACDatabase Go exec sp_msforeachtable @command="ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all"