ALTER DOMAIN statement

Description

Renames a user-defined domain or data type. Does not rename Java types.

Syntax

ALTERDOMAIN | DATATYPE } user-type
RENAME new-name 

Parameters

new-name:

an identifier representing the new domain name.

user-type:

user-defined data type of the domain being renamed.

Examples

Example 1

The following renames the Address domain to MailingAddress:

ALTER DOMAIN Address RENAME MailingAddress

Usage

The ALTER DOMAIN statement updates the name of the user-defined domain or data type in the SYSUSERTYPE system table.

You must recreate any procedures, views or events that reference the user-defined domain or data type, or else they will continue to reference the former name.


Side effects

Automatic commit.

Permissions

Must have DBA authority or be the database user who created the domain.

See also

CREATE DOMAIN statement

Chapter 3, “SQL Data Types” in Reference: Building Blocks, Tables, and Procedures

“SYSUSERTYPE system view”in Chapter 8, “System Views” in Reference: Building Blocks, Tables, and Procedures