I try to drop all the foreign and primary keys for an assignment, but so far I get the following error:
Msg 3728, Level 16, State 1, Line 3
'fk_DEPENDENT_ESSN' is not a constraint.Msg 3727, Level 16, State 0, Line 3
Could not drop constraint. See previous errors.
Here are my commands:
Use Company;
Go
--Dropping FKs from Dependent Table
ALTER TABLE Dependent
DROP fk_DEPENDENT_ESSN
--Dropping FKs from Dept_Locations Table
ALTER TABLE Dept_Locations
DROP fk__DEPT_LOCATIONS__Dnumber
--Dropping FKs from Employee Table
ALTER TABLE Employee
DROP FK__Employee__Dno
ALTER TABLE Employee
DROP FK__Employee__Super___ssn
--Dropping FKs from Project Table
ALTER TABLE Project
DROP FK__Project
--Dropping FKs from WORKS_ON Table
ALTER TABLE WORKS_ON
DROP FK__WORKS_ON__Essn
ALTER TABLE WORKS_ON
DROP FK__WORKS_ON__PNO
How should I fix this, sorry I can't post my database on here. if you have any questions, feel free to comment or we can email.
Thanks