1USE AdventureWorks2012;
2GO
3ALTER TABLE dbo.DocExe
4DROP CONSTRAINT FK_Column_B;
5GO
6
1create table etc(
2 numeric (4) anything constraint Gives_name_to_a_restriction primary key);
1It creates a new constraint on an existing table, which is used to specify
2rules for any data in the table.
3Example: Adds a new PRIMARY KEY constraint named ‘user’ on columns
4ID and SURNAME.
5ALTER TABLE users
6ADD CONSTRAINT user PRIMARY KEY (ID, SURNAME);