May 2020
Beginner
564 pages
14h 9m
English
To drop a CHECK constraint, you need to run the following query:
USE foraltering;ALTER TABLE tableforalteringDROP CHECK check_yearID;
The preceding query drops the CHECK constraint named check_yearID. Dropping CHECK constraints is different from dropping other constraints, such as foreign keys or primary keys. A foreign key constraint can be dropped using the following query:
ALTER TABLE tablenameDROP FOREIGN KEY FK_keyname;
Primary key constraints can be dropped using the following query:
ALTER TABLE tablenameDROP PRIMARY KEY;
An index can be dropped using the following query:
USE yourschema;ALTER TABLE managers DROP INDEX playerID_yearID_teamID_UNIQUE;
There are some differences in dropping constraints ...
Read now
Unlock full access