DROP EXTERNAL TABLE
Drops an external table.
Syntax
DROP EXTERNAL TABLE [IF EXISTS] <name> [CASCADE | RESTRICT]
Description
DROP EXTERNAL TABLE
does not delete the external data sources and files. To run this command, you must be the owner of the external table.
Parameters
-
IF EXISTS
If you include
IF EXISTS
in your command, no error will reported if the specified external table does not exist. A notice will be issued instead. -
<name>
The name of the external table. You can prefix the name with a schema name to drop the external table from the specified schema.
-
CASCADE
orRESTRICT
Whether to drop the table and its dependent objects if dependent objects exist. Supported options include:
CASCADE
: specifies to drop the dependent objects along with the external table.RESTRICT
: specifies to reject the drop operation.
Examples
Remove external table products
:
DROP EXTERNAL TABLE IF EXISTS products;
SQL standard compatibility
Standard SQL does not support DROP EXTERNAL TABLE
.