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

SQL DROP TABLE

The SQL DROP TABLE Statement

The DROP TABLE statement is employed to remove a pre-existing table from a database.

Syntax

DROP TABLE table_name

 

Caution: Exercise care prior to dropping a table. Deleting a table will lead to the irreversible loss of all data stored within it!

SQL DROP TABLE Example

The subsequent SQL statement removes the current table named “Shippers”:

Example

DROP TABLE Shippers;

SQL TRUNCATE TABLE

The TRUNCATE TABLE statement is employed to clear the data within a table, without removing the table itself.

Syntax

TRUNCATE TABLE table_name