AttentionThis page documents an earlier version. Go to the latest (v2.3) version.
REASSIGN OWNED statement to change the ownership of database objects owned by any of the
reassign_owned ::= REASSIGN OWNED BY role_specification [ , ... ] TO role_specification role_specification ::= role_name | CURRENT_USER | SESSION_USER
REASSIGN OWNED is typically used to prepare for the removal of a role. It requires membership on both the source roles and target role.
- Reassign all objects owned by john to yugabyte.
yugabyte=# reassign owned by john to yugabyte;