title: SQL Server : cannot drop table
body: <p>I try to drop all the foreign and primary keys for an assignment, but so far I get the following error:</p>
  
  <blockquote>
    <p>Msg 3728, Level 16, State 1, Line 3<br>
    'fk_DEPENDENT_ESSN' is not a constraint.  </p>
    
    <p>Msg 3727, Level 16, State 0, Line 3<br>
    Could not drop constraint. See previous errors.</p>
  </blockquote>
  
  <p>Here are my commands:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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.</p>
  
  <p>Thanks</p>