SQL DROP TABLE and TRUNCATE TABLE Keywords
DROP TABLE
The DROP TABLE
command deletes a table in
the database.
The following SQL deletes the table "Shippers":
Example
DROP TABLE Shippers;
Note: Be careful before deleting a table. Deleting a table results in loss of all information stored in the table!
TRUNCATE TABLE
The TRUNCATE TABLE
command deletes the data inside a table, but
not the table itself.
The following SQL truncates the table "Categories":
Example
TRUNCATE TABLE Categories;
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.