how to remove foreign key constraint in sql
snippet in sql

how to remove foreign key constraint in sql

user2889

USE AdventureWorks2012;  
GO  
ALTER TABLE dbo.DocExe   
DROP CONSTRAINT FK_Column_B;   
GO  

drop foreign key

user4843

ALTER TABLE table_name
DROP CONSTRAINT fk_name;

remove foreign key

user6661


ALTER TABLE Orders

ADD CONSTRAINT FK_PersonOrder

FOREIGN KEY (PersonID)
REFERENCES Persons(PersonID);