Syntax
The DROP statement has the following format:
[EXEC SQL] DROP [object_type] [IF EXISTS] [schema.]object_name {, [schema.]object_name} [RESTRICT | CASCADE];
object_type
Specifies the type of object to drop, which can be one of the following keywords:
TABLE
VIEW
INDEX
The following object types can also be dropped. These DROP statements are described under separate entries in this chapter:
LINK (Applies to Ingres Star only. See the Ingres Star User Guide.)
PROCEDURE
IF EXISTS
Suppresses error reporting for the specified object if the object does not exist or exists but is not owned by you. The IF EXISTS option can be used only for object types TABLE, VIEW, INDEX, SYNONYM, PROCEDURE, LINK.
object_name
Specifies the name of a table, view, index, or other valid object.
RESTRICT
Aborts the DROP statement with error if any objects (views, procedures, synonyms, or referential constraints) depend on the object being dropped.
This is the default for INDEX.
CASCADE
Drops all dependent objects. This is the default for TABLE and VIEW.