ALLBASE/SQL Reference Manual (36216-90216)

406 Chapter10
SQL Statements A - D
DROP TABLE
DROP TABLE
The DROP TABLE statement deletes the specified table, including any hash structure or
constraints associated with it, all indexes, views, and rules defined on the table, and all
authorizations granted on the table.
Scope
ISQL or Application Programs
SQL Syntax
DROP TABLE [
Owner
.]
Tablename
Parameters
[
Owner
.]
TableName
identifies the table to be dropped.
Description
The DROP TABLE statement may invalidate stored sections. Refer to the
ALLBASE/SQL Database Administration Guide for additional information on section
validation.
You cannot drop a table which has a primary or unique constraint referenced by a
foreign key in another table. (You can, however, if the only foreign keys are within the
same table.)
Any authorities used to authorize a foreign key on the table are released when the table
is dropped.
Authorization
You can issue this statement if you have OWNER authority for the table or if you have
DBA authority.
Example
This table is private by default.
CREATE TABLE VendorPerf
(OrderNumber INTEGER NOT NULL,
ActualDelivDay SMALLINT,
ActualDelivMonth SMALLINT,
ActualDelivYear SMALLINT,
ActualDelivQty SMALLINT
Remarks VARCHAR(60) )
IN Miscellaneous