Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

DROP TABLE

DROP TABLE

The DROP TABLE command removes a table from the database.

The provided SQL statement deletes the table named “Shippers”.

Example

DROP TABLE Shippers;
Caution: Exercise caution before deleting a table as it leads to the loss of all data stored within it!

TRUNCATE TABLE

The TRUNCATE TABLE command removes all data within a table while retaining the table structure.

The given SQL truncates the “Categories” table.

Example

TRUNCATE TABLE Categories;