bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

SQL DROP TABLE and TRUNCATE TABLE Keywords

Concept visual

SQL DROP TABLE and TRUNCATE TABLE Keywords

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

DROP TABLE and TRUNCATE TABLE Keywords

Previous

❮ SQL Keywords

Next

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 Keywords

Next

Previous

SQL SELECT TOP, LIMIT and ROWNUM Keywords

Next

SQL UNION Keyword