DROP TABLE

SQL DROP TABLE Keyword

The DROP TABLE command deletes a table from the database. Once dropped, all the data, structure, and associated indexes are permanently removed.

Tutorials dojo strip

SQL DROP TABLE Syntax

SQL

SQL DROP TABLE Example

SQL

SQL TRUNCATE TABLE

The TRUNCATE TABLE command removes all rows from a table but retains the table structure for future use. This is useful for resetting table contents without dropping the table.

SQL TRUNCATE TABLE Syntax

SQL

SQL TRUNCATE TABLE Example

SQL

Note: SQLite (including the TechKubo playground) does not support the TRUNCATE TABLE command. Use DELETE FROM table_name; instead to clear data from a table.

SQL DROP TABLE Labs

Tutorials dojo strip