Loading Data Driven Insights
Preparing your learning content.
Preparing your learning content.
A beginner-friendly guide to the SQL DROP TABLE statement, how it removes a table completely, and how it differs from TRUNCATE TABLE.
On this page
Jump to a lesson section
The DROP TABLE statement is used to remove a table completely from a database.
It removes the table itself, including its structure, columns, data types, and stored rows.
The basic syntax is simple: write DROP TABLE, followed by the table name.
DROP TABLE table_name;
For example, this command removes the Employees table from the database.
DROP TABLE Employees;
Before running DROP TABLE, the table exists in the database and contains rows.
To remove the whole table, run DROP TABLE with the table name.
DROP TABLE Employees;
After this command runs successfully, the Employees table no longer exists.
DROP TABLE and TRUNCATE TABLE both remove data, but they are not the same.
Use TRUNCATE TABLE when you want to clear all rows but keep the table.
SQL Roadmap Progress
Topic 15 of 111
14% complete
Next in SQL Roadmap
Continue with the next SQL topic in the recommended roadmap order.
Continue learning →