background image
<< DROP ROLE statement | GRANT statement >>

DROP TABLE statement

<< DROP ROLE statement | GRANT statement >>
Derby Reference Manual
56
Dropping a sequence generator implicitly drops all USAGE privileges that reference it.
Example
DROP SEQUENCE order_id RESTRICT;
DROP SYNONYM statement
Drops the specified synonym from a table or view.
Syntax
DROP SYNONYM
synonym-Name
DROP TABLE statement
DROP TABLE removes the specified table.
Syntax
DROP TABLE
table-Name
Statement dependency system
Triggers, constraints (primary, unique, check and references from the table being
dropped) and indexes on the table are silently dropped. The existence of an open cursor
that references table being dropped cause the DROP TABLE statement to generate an
error, and the table is not dropped.
Dropping a table invalidates statements that depend on the table. (Invalidating a
statement causes it to be recompiled upon the next execution. See
Interaction with the
dependency system
.)
DROP TRIGGER statement
DROP TRIGGER removes the specified trigger.
Syntax
DROP TRIGGER
TriggerName
Example
DROP TRIGGER TRIG1
Statement dependency system
When a table is dropped, all triggers on that table are automatically dropped. (You don't
have to drop a table's triggers before dropping the table.)
DROP TYPE statement
The DROP TYPE statement removes a user-defined type (UDT) that was created using a
CREATE TYPE statement
.
Syntax
DROP TYPE [
schemaName
. ]
SQL92Identifier
RESTRICT
The type name is composed of an optional schemaName and a SQL92Identifier. If a
schemaName is not provided, the current schema is the default schema. If a qualified
type name is specified, the schema name cannot begin with SYS.
The RESTRICT keyword is required. CASCADE semantics are not supported. That is,
Derby will not track down and drop orphaned objects.
Dropping a UDT implicitly drops all USAGE privileges that reference it.