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 connection, the user requires the ALTER ANY CONNECTION system privilege, or the user has received the connection the WITH ADMIN OPTION.
- If the object is a consumer group, the user needs to have the system privilege MANAGE CONSUMER GROUPS.
- 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.