bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

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;

Previous

SQL DROP INDEX Keyword

Next

SQL DROP VIEW Keyword