The RENAME USER statement changes the name of a
user.Syntax
<rename_user_statement> ::= RENAME USER <user_name> TO <new_user_name>
user_nameExplanation
The user to be modified must exist. The user name must identify the current user or a user over whom the current user has the owner privilege.
The new user name must not be identical to the name of an existing user, usergroup, or role.
If the name of the user to be modified is different from that of the current user, the user that is to be modified must not be logged onto the database system when the RENAME USER statement is executed. Otherwise, the current transaction is terminated with COMMIT before executing the RENAME USER statement is executed.
The database system automatically adapts the objects that are dependent on the modified user to the new user name.