Use this statement to rename schemas and schema objects.
- If the object is a schema, it must belong to the user or one of the user roles.
- If the object is a schema object, the object must belong to the user or one of the user roles (that is, located in one's own schema or that of an assigned user role).
- If the object is a user or role, then the user requires the CREATE USER or CREATE ROLE privileges.
- If the object is a consumer group, the user needs to have the system privilege MANAGE CONSUMER GROUPS.
- If the object is a connection, at least one of the following prerequisites must be fulfilled:
- User has the system privilege ALTER ANY CONNECTION
- The connection is granted to the user with the WITH ADMIN OPTION
- The connection belongs to the current user or one of the user’s roles
- Schema objects cannot be shifted to another schema with the RENAME statement. For example, 'RENAME TABLE s1.t1 TO s2.t2' is not allowed.
- Distinguishing between schema or tables is optional and only necessary if two identical objects share the same name.