DROP OWNED
Synopsis
Use the DROP OWNED
statement to drop all database objects within the current database that are owned by one of the specified roles.Any privileges granted to the given roles on objects in the current database or on shared objects will also be revoked.
Syntax
drop_owned ::= DROP OWNED BY role_specification [ , ... ]
[ CASCADE | RESTRICT ]
role_specification ::= role_name | CURRENT_USER | SESSION_USER
drop_owned
role_specification
Semantics
- CASCADE
Automatically drop objects that depend on the affected objects.
- RESTRICT
This is the default mode and will raise an error if there are other database objects that depend on the dropped objects.
Examples
- Drop all objects owned by
john
.
yugabyte=# drop owned by john;
See also
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .