DB2 Version 9.7 for Linux, UNIX, and Windows

Dropping schemas

Before dropping a schema, all objects that were in that schema must be dropped or moved to another schema. The schema name must be in the catalog when attempting the DROP statement; otherwise an error is returned.

About this task

To drop a schema using the command line, enter:
    DROP SCHEMA <name> RESTRICT
In the following example, the schema "joeschma" is dropped:
    DROP SCHEMA joeschma RESTRICT

The RESTRICT keyword enforces the rule that no objects can be defined in the specified schema for the schema to be deleted from the database, and it must be specified.