Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - SQL Reference » SQL statements » Alphabetical list of SQL statements

DROP DOMAIN statement

Removes a domain (data type) from the database.

Syntax
DROP DOMAIN domain-name 
Remarks

DROP DOMAIN is prevented if the data type is used in a table column, or in a procedure or function argument. You must change data types on all columns defined using the domain to drop the data type. It is recommended that you use DROP DOMAIN rather than DROP DATATYPE, as DROP DOMAIN is the syntax used in the ANSI/ISO SQL Standard. You cannot drop system-defined data types (such as MONEY or UNIQUEIDENTIFIERSTR) from a database.

Privileges

You must be the owner of the domain, or have the DROP DATATYPE or DROP ANY OBJECT system privilege.

Side effects

Automatic commit.

Standards
  • ANSI/ISO SQL Standard

    Domain support is optional SQL Language Feature F251.

Example

The following example creates and then drops the domain CustPhoneNumber.

CREATE DOMAIN CustPhoneNumber CHAR(12) NULL;
DROP DOMAIN CustPhoneNumber;