ALTER DOMAIN statement

Description

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

Syntax

ALTER { DOMAIN | 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 4, “SQL Data Types”

“SYSUSERTYPE system table”