How to remove foreign key constraint in sql server?

Ammar Asjad picture Ammar Asjad · Sep 19, 2012 · Viewed 264.7k times · Source

I want to remove foreign key from another table so i can insert values of my choice.

I am new in databases so please tell me correct sql query to drop or remove foreign key value.

Answer

Prasanna picture Prasanna · Sep 19, 2012

Try following

ALTER TABLE <TABLE_NAME> DROP CONSTRAINT <FOREIGN_KEY_NAME>

Refer : http://www.w3schools.com/sql/sql_foreignkey.asp