Using SQL Server Management Studio
- In Object Explorer, expand the table with the check constraint.
- Expand Constraints.
- Right-click the constraint and click Delete.
- In the Delete Object dialog box, click OK.
What is on delete restrict in SQL?
The ON DELETE clause says that if a particular primary key ID value in the CUSTOMERS table is deleted, this action shall be prevented (this is the "restrict" part) if there is any row in the ORDERS table which has a foreign key that matches the value of the CUSTOMER table ID value.
How do I delete a constraint?
The SQL syntax to remove a constraint from a table is,
- ALTER TABLE "table_name" DROP [CONSTRAINT|INDEX] "CONSTRAINT_NAME";
- ALTER TABLE Customer DROP INDEX Con_First;
- ALTER TABLE Customer DROP CONSTRAINT Con_First;
- ALTER TABLE Customer DROP CONSTRAINT Con_First;