title: How to DROP table in correct order in SQL SERVER 2014?
body: <p>I have following 5 tables and 1 table is connected as Foreign key in 2 tables. My dilemma is that I cannot figure out which table to drop first. below is the drop table code I am trying and I have created tables in following order</p>
  
  <p>
  <strong>Updated  Drop Table Code:</strong></p>
  
  <pre><code> IF EXISTS (SELECT*FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='[Student Major]')
      BEGIN
          DROP TABLE [Student Major]
      END
      GO
      IF EXISTS (SELECT*FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='Major')
      BEGIN
          DROP TABLE Major
      END
      GO
      IF EXISTS (SELECT*FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='Citizenship')
      BEGIN
          DROP TABLE Citizenship
      END
      GO
      IF EXISTS (SELECT*FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='Country')
      BEGIN
          DROP TABLE Country
      END
      IF EXISTS (SELECT*FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='Student')
      BEGIN
          DROP TABLE Student
      END
      GO
  </code></pre>
  
  <hr>
  
  <pre><code>CREATE TABLE Student(
      [Student ID] INT IDENTITY PRIMARY KEY
      ,[First Name] varchar (50) NOT NULL
      ,[Last Name] varchar (30) NOT NULL
      )
  GO
  
  CREATE TABLE Country(
      [Country ID] int identity PRIMARY KEY NOT NULL
      ,[Country of Birth] varchar (10)
      ,[Student ID] int FOREIGN KEY REFERENCES Student([Student ID]) NOT NULL
      )
  GO
  
  CREATE TABLE Citizenship(
      [Citizenship ID] int identity PRIMARY KEY
      ,[Country of Citizenship1] varchar (10)
      ,[Country of Citizenship2] varchar (10)
      ,[Student ID] int FOREIGN KEY REFERENCES Student([Student ID]) NOT NULL
      ,[Country ID] int FOREIGN KEY REFERENCES Country([Country ID]) NOT NULL
      )
  GO
  CREATE TABLE Major(
      [Major ID] int identity PRIMARY KEY
      ,[Major Name] varchar(30) NOT NULL
      )
  GO
  
  CREATE TABLE [Student Major](
      [Student MajorID] int identity 
      ,[Student ID] int FOREIGN KEY REFERENCES Student([Student ID])
       ,[Major ID] int FOREIGN KEY REFERENCES Major([Major ID])
       ,[Graduated Major] varchar (30) NOT NULL
      )
  GO
  </code></pre>
  
  <p>
  I Would like to drop table in correct order</p>
  
  <p>
  Errors:
  Could not drop object 'Student' because it is referenced by a FOREIGN KEY constraint.
  Also,Please provide explanation of dropping the table. I am new to SQL.
  Thanks in advance!</p>