Deleting a schema definition (DROP SCHEMA statement) Deleting a sequence definition (DROP SEQUENCE statement)
To delete a schema definition, use the DROP SCHEMA statement. A specification example follows.
Example:
Delete a schema belonging to STOCKMN_DB.
When an attempt is made to delete a schema definition, if any of the following definitions subordinate to that schema
exist, the schema cannot be deleted. The user must delete these definitions before deleting the schema definition:
· Sequence
· Table
· View
· Temporary table
· Trigger
· Index
· Storage structure
- Table DSO
- Index DSO
- Table DSI
- Index DSI
· Procedure
· Function routine
However, if the user specifies CASCADE, then even if the preceding definitions exist, all related definitions are
unconditionally deleted.
Adding a sequence definition (CREATE SEQUENCE statement) To add a sequence definition to a schema, use the CREATE SEQUENCE statement. A specification example follows.
For details on how to specify the CREATE SEQUENCE statement, see 2.6 "Defining a Logical Structure."
Example:
Adds a definition of SEQUENCE2 to schema STOCKS
To delete a sequence definition, use the DROP SEQUENCE statement. If a base table, view table, procedure routine,
function routine, or trigger references a sequence, the sequence definition cannot be deleted. Delete the definition of
the base table, view table, procedure routine, function routine, or trigger that references the sequence before deleting
the sequence definition. A specification example follows.
Example:
Deletes SEQUENCE1.
117