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

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - SQL Reference » Using SQL » SQL statements » SQL statements (A-D)


DROP DOMAIN statement

Use this statement to remove a domain from the database.

DROP DOMAIN domain-name 

Use the IF EXISTS clause if you do not want an error returned when the DROP DOMAIN statement attempts to remove a database object that does not exist.

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 SQL3 draft. You cannot drop system-defined data types (such as MONEY or UNIQUEIDENTIFIERSTR) from a database.


Any user who owns the object, or has DBA authority, can execute the DROP DOMAIN statement.

Side effects

Automatic commit. Clears the Results tab in the Results pane in Interactive SQL.

See also
Standards and compatibility
  • SQL/2003   Core feature.


Drop the domain MyDomain from the database. If the domain does not exist, an error is returned.