docs/sql-reference/statements/drop-table.mdx
Remove a table and all its data, indexes, triggers, and constraints from the database.
DROP TABLE [IF EXISTS] [schema-name.]table-name;
DROP TABLE permanently removes a table definition and all data stored in the table. All indexes, triggers, and constraints associated with the table are also removed.
| Parameter | Description |
|---|---|
IF EXISTS | Prevents an error if the table does not exist. The statement is a no-op when the table is absent. |
schema-name | The name of the attached database containing the table. Defaults to the main database if omitted. |
table-name | The name of the table to drop. |
sqlite_schema system table.DROP TABLE is not allowed while the table is being read or written by another statement in the same connection.DROP TABLE users;
DROP TABLE IF EXISTS temporary_results;
DROP TABLE aux.sessions;