Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Disable foreign key constraints

Author  Topic 

mb
Starting Member

16 Posts

Posted - 2002-01-15 : 05:48:03
Does anyone know the syntax for disabling foreign key constraints on sql server?

Nazim
A custom title

1408 Posts

Posted - 2002-01-15 : 07:43:23
ALTER TABLE table
{ [ALTER COLUMN column_name
{ new_data_type [ (precision[, scale] ) ]
[ NULL | NOT NULL ]
| {ADD | DROP} ROWGUIDCOL
}
]
| ADD
{ [ <column_definition> ]
| column_name AS computed_column_expression
}[,...n]
| [WITH CHECK | WITH NOCHECK] ADD
{ <table_constraint> }[,...n]
| DROP
{ [CONSTRAINT] constraint_name
| COLUMN column
}[,...n]
| {CHECK | NOCHECK} CONSTRAINT
{ALL | constraint_name[,...n]}
| {ENABLE | DISABLE} TRIGGER
{ALL | trigger_name[,...n]}



using Check and Nocheck you can enable and disable a trigger
----------------------------------
"True love stories don't have endings."

Edited by - Nazim on 01/15/2002 08:01:34
Go to Top of Page
   

- Advertisement -