DROP TABLE
Function
This command deletes an existing table.
Syntax
DROP TABLE [IF EXISTS] [db_name.]table_name;
Parameter Description
| Parameter | Description |
|---|---|
| db_name | Database name. If not specified, the current database is selected. |
| table_name | Name of the table to be deleted. |
Required Permissions
- SQL permissions
Table 2 Permissions required for executing DROP TABLE Permission Description
DROP_TABLE permission on the database where the table is
- Fine-grained permission: dli:table:dropTable
- Metadata services provided by LakeFormation. Refer to the LakeFormation documentation for details on permission configuration.
Examples
DROP TABLE IF EXISTS db0.delta_table0;
System Response
The table is successfully deleted from the metadata and cannot be found using show and describe.