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.
SQL DROP TABLE Syntax
SQL
x
1
DROP TABLE table_name;
SQL DROP TABLE Example
SQL
1
1
DROP TABLE Prescriptions;

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
1
1
TRUNCATE TABLE table_name;
SQL TRUNCATE TABLE Example
SQL
1
1
TRUNCATE TABLE Prescriptions;
Note: SQLite (including the TechKubo playground) does not support the
TRUNCATE TABLE
command. UseDELETE FROM table_name;
instead to clear data from a table.