• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. SQL Reference
  5. SQL Syntax
  6. DROP FOREIGN TABLE

DROP FOREIGN TABLE

Function

DROP FOREIGN TABLE deletes a specified foreign table.

Precautions

DROP FOREIGN TABLE forcibly deletes a specific table. After a table is deleted, any indexes that exist for the table will be deleted. The functions and stored procedures used in this table cannot be executed.

Syntax

DROP FOREIGN TABLE [ IF EXISTS ] 
    table_name [, ...] [ CASCADE | RESTRICT ];

Parameter Description

  • IF EXISTS

    Does not throw an error if the table does not exist. A notice is issued in this case.

  • table_name

    Specifies the name of the table.

    Value range: An existing table name.

  • CASCADE | RESTRICT
    • CASCADE: Automatically deletes all objects (such as views) that depend on the table, and in turn all objects that depend on those objects.
    • RESTRICT: refuses to delete the table if any objects depend on it. This is the default.