Curriculum
Course: MYSQL
Login

Curriculum

MYSQL

MySQL References

0/140
Text lesson

MySQL DROP TABLE

The MySQL DROP TABLE Statement

The DROP TABLE statement is used to delete an existing table from a database.

Syntax

DROP TABLE table_name;
Note: Exercise caution before dropping a table. Deleting a table will lead to the permanent loss of all information stored within it!

MySQL DROP TABLE Example

The SQL statement below drops the existing table named ‘Shippers’

Example

DROP TABLE Shippers;

MySQL TRUNCATE TABLE

The TRUNCATE TABLE statement is used to remove all data from a table, while keeping the table structure intact.

Syntax

TRUNCATE TABLE table_name;