You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ALTERTABLE<table_name> NOCHECK CONSTRAINT ALL;
ALTERINDEX ALL ON<table_name> DISABLE;
ALTERINDEX ALL ON<table_name> REBUILD;
ALTERTABLE<table_name>CHECKCONSTRAINT ALL;
How to turn IDENTITY_INSERT on and off using SQL Server
SET IDENTITY_INSERT sometableWithIdentity ON
INSERT sometableWithIdentity (IdentityColumn, col2, col3, ...)
VALUES (AnIdentityValue, col2value, col3value, ...)
SET IDENTITY_INSERT sometableWithIdentity OFF
Cannot drop database "databasename" because it is currently in use.
use master;
GO
ALTERDATABASE databasename SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
Drop constraint
altertable tablename DROP CONSTRAINT constraint_name