Microsoft Docs – SQL Server

T‑SQL Reference

DROP TABLE (Transact‑SQL)

Syntax

DROP TABLE [ IF EXISTS ] 
    { 
        [ schema_name . ] table_name 
      | [ database_name . [ schema_name ] . ] table_name 
    } [ , …n ] 
    [ ; ]

The DROP TABLE statement removes one or more tables from the database. Use IF EXISTS to avoid an error if the table does not exist.

Parameters

Remarks

Examples

Example 1 – Drop a Single Table

DROP TABLE dbo.Employees;

Example 2 – Drop Multiple Tables

DROP TABLE dbo.Customers, dbo.Orders;

Example 3 – Drop a Table If It Exists

DROP TABLE IF EXISTS dbo.TempData;

See Also