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.
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.
Learning SQL in order?
Use the roadmap to follow each SQL topic step by step, from relational database basics to advanced query techniques.
Back to SQL RoadmapRelated lessons
ALTER TABLE
A beginner-friendly guide to ALTER TABLE in SQL, including how to add, change, and remove columns from an existing table.
CREATE TABLE
A beginner-friendly guide to the SQL CREATE TABLE statement, including table planning, column names, data types, and a SQL Server-friendly example.
DELETE
A beginner-friendly guide to the SQL DELETE statement, with SQL Server-friendly examples for removing rows from a table safely.