doc-exports/docs/dws/dev/dws_06_0198.html
Lu, Huayi ef0ada5a59 DWS DEV 20240716 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-11-02 09:07:47 +00:00

4.3 KiB

DROP OWNED

Function

Deletes the database objects owned by a database role.

Precautions

The role's permissions on all the database objects in the current database and shared objects (databases and tablespaces) are revoked.

Syntax

1
DROP OWNED BY name [, ...] [ CASCADE | RESTRICT ];

Parameter Description

  • name

    Name of the role whose objects are to be deleted and whose permissions are to be revoked.

  • CASCADE | RESTRICT
    • CASCADE: automatically deletes objects that depend on the affected objects.
    • RESTRICT (default): refuses to delete objects that have other objects depend on them.

Examples

Remove all database objects owned by role u1:

1
DROP OWNED BY u1;