Sqlite Drop Table
# SQLite Drop Table
SQLite's **DROP TABLE** statement is used to delete a table definition and all its associated data, indexes, triggers, constraints, and permission specifications for that table.
> Use this command with extreme caution, as once a table is deleted, all 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 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 result is empty, indicating that the table has been successfully deleted from the database.
YouTip