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

ALTER DOMAIN statement

Renames a user-defined domain or data type.

ALTER { DOMAIN | DATATYPE } user-type 
RENAME new-name

When you execute this statement, the name of the user-defined domain or data type is updated in the ISYSUSERTYPE system table.

Note Although domain name references in table schema are automatically updated, any procedures, triggers, views, or events that refer to the old user-defined domain or data type must be updated manually to refer to the new name.

You must be the owner of the domain, or have one of the following privileges:

  • ALTER privilege on the domain
  • ALTER DATATYPE system privilege
  • ALTER ANY OBJECT system privilege
Side effects

Automatic commit.

  • ANSI/ISO SQL Standard

    Not in the standard. The ALTER DOMAIN statement is optional ANSI/ISO SQL Feature F711. However, in the standard, ALTER DOMAIN can specify modified DEFAULT or CHECK constraint clauses for an existing domain. Neither of these operations are supported in the software. Feature F711 does not support the renaming of a domain.


The following example renames the fictitious Address domain to MailingAddress:

ALTER DOMAIN Address RENAME MailingAddress;