The DROP TABLE
statement in SQL is used to delete an existing table from the database.
Syntax:
1 2 |
DROP TABLE table_name; |
Example:
1 2 |
DROP TABLE cars; |
In this example, the DROP TABLE
statement is used to delete the cars
table from the database. Note that when a table is dropped, all the data stored in the table is permanently lost, so it is important to use this statement with caution.