In Oracle, to drop the constraint PK_SAI
I use the syntax:
ALTER TABLE "SAISIE"
DROP CONSTRAINT "PK_SAI" CASCADE;
What is the equivalent of this in SQL Server?
In Oracle, to drop the constraint PK_SAI
I use the syntax:
ALTER TABLE "SAISIE"
DROP CONSTRAINT "PK_SAI" CASCADE;
What is the equivalent of this in SQL Server?
You are thinking of the CASCADE feature on FOREIGN KEY constraints, in relation to actual DELETE statements.
Dropping a constraint with CASCADE does not delete any rows.
DELETE deletes rows, if you have enabled ON DELETE CASCADE.
Dropping the constraint simply drops the constraint (and associated indexes and dependent constraints), not data rows. In SQL Server
ALTER TABLE ...
I am not aware that there is a "CASCADE" option as in Oracle.From Oracle docs http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_3001.htm#i2103845 for the ALTER TABLE statement: