DROP DOMAIN

DROP DOMAIN — remove a SQL domain

Syntax

DROP DOMAIN [IF EXISTS] [SCHEMA.]name
DROP DOMAIN [SCHEMA.]name [IF EXISTS]

Description

Removes a SQL domain from the database. (Not to be confused with a NuoDB domain (NuoDB).)
You must own the domain to drop it. If the domain does not exist, and you specify IF EXISTS, NuoDB does not generate an error. Otherwise, if the domain does not exist, an error is generated.

Parameters

IF EXISTS

If the domain does not exist and you specify IF EXISTS, NuoDB does not generate an error. Otherwise, if the domain does not exist, an error is generated.

schema

Optional. The name of the schema that owns the domain to be dropped. If schema is not provided, the domain must be owned by the current schema.

name

Name of a domain to remove.

Examples

Example 1: Drop domains that do not exist using IF EXISTS
DROP DOMAIN IF EXISTS nosuchdomain;
DROP DOMAIN nosuchdomain IF EXISTS;