Neoview SQL Reference Manual (R2.4)

DROP SCHEMA Statement
“Syntax Description of DROP SCHEMA”
“Considerations for DROP SCHEMA”
“Example of DROP SCHEMA”
The DROP SCHEMA statement deletes a Neoview SQL schema. See“Schemas” (page 285).
DROP SCHEMA schema [RESTRICT|CASCADE]
Syntax Description of DROP SCHEMA
schema
is the name of the schema to delete.
RESTRICT
If you specify RESTRICT, an error is reported if the specified schema is not empty. The default
is RESTRICT.
CASCADE
If you specify CASCADE, objects in the specified schema, in addition to the schema itself,
are dropped.
Considerations for DROP SCHEMA
Authorization and Availability Requirements
To drop a schema, you must be the owner of the schema. However, if there are no user tables in
the schema, anyone can drop the schema.
Transaction Limits on DROP SCHEMA
If the schema is fairly large and contains many rows, DROP SCHEMA with the CASCADE option
might fail with file-system error 35:
Unable to obtain an I/O process control block or the transaction or open lock unit limit has been reached.
In this case, too many locks are requested.
Example of DROP SCHEMA
This example drops an empty schema:
DROP SCHEMA sales;
112 SQL Statements