How can I use T-SQL to drop or disable foreign key constraint in SQL Server by using SQL Analyzer. I know this can be done by GUI Enterprise Manager. I want to know how to use T-SQL to do the same job. Thanks
Look in SQL BOL under Alter Table. Read about Check/Nocheck Contraint.
ALTER TABLE table_name NOCHECK CONSTRAINT constraint_name Terry L. Broadbent FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.