SQLite Delete Table
SQLite's DROP TABLE The statement is used to delete a table definition and all its associated data, indexes, triggers, constraints, and permission specifications for that table.
You should be very careful when using this command, because once a table is deleted, all the information in the table will be lost forever.
Syntax
The basic syntax of the DROP TABLE statement is as follows. You can optionally specify the database name along with the table name, as shown below:
DROP TABLE database_name.table_name;
Example
Let's first confirm that the COMPANY table exists, and then we will delete it from the database.
sqlite>.tables
COMPANY test.COMPANY
This means the COMPANY table already exists in the database; next let's delete it from the database, as follows:
sqlite>DROP TABLE COMPANY;
sqlite>
Now, if you try the .TABLES command, the COMPANY table will no longer be found:
sqlite>.tables
sqlite>
The displayed result is empty, meaning the table has been successfully deleted from the database.