DROP DOMAIN Statement
statement_DROP_DOMAIN ::= DROP [ IF EXISTS ] DOMAIN [scheme.]domain_name [ CASCADE | RESTRICT ]
The DROP DOMAIN statement deletes an existing domain. If this domain is used in table definitions, the statement behaviour depends on the CASCADE or RESTRICT specification:
- If CASCADE is stated, all tables using this domain will be deleted.
- If RESTRICT is stated (or neither option is set), the error W0162 (REFERENCED_BY_OTHER_OBJECT) occurs and the domain is not deleted.
If a domain of the specified name does not exist in the schema the error sqlstate W0137 (OBJECT_DOES_NOT_EXIST) occurs.
See