SQLite DROP TABLE Statement
SQLite DROP TABLE Statement
The SQLite DROP TABLE statement removes a table definition and all associated table data from the database. This statement removes the table data, indexes, triggers, constraints, etc.
SQLite DROP TABLE
Syntax
The basic general syntax of the DROP TABLE statement is as follows:
DROP TABLE table_name;
We can optionally specify the database name along with the table name as follows:
DROP TABLE database_name.table_name;
We must be cautious while using this command because this is a destructive statement. Once the table is deleted, all the database table information will be lost.
Example
For example, to drop a table named employee. We can issue the following
command:
sqlite>DROP TABLE employee;
We can verify the table has been dropped successfully using the .tables command.
—
SQLite Tutorials
SQLite tutorials on this website:
https://www.testingdocs.com/sqlite-database-tutorials/