title: "DROP OWNED"
description: "DROP OWNED
drops all the objects that are owned by one of the specified roles."
menu:
main:
parent: commands
DROP OWNED
drops all the objects that are owned by one of the specified roles.
Any privileges granted to the given roles on objects will also be revoked.
{{< note >}} Unlike PostgreSQL, Materialize drops all objects across all databases, including the database itself. {{< /note >}}
{{< diagram "drop-owned.svg" >}}
Field | Use |
---|---|
_rolename | The role name whose owned objects will be dropped. |
CASCADE | Remove all dependent objects. |
RESTRICT | Don't remove anything if any non-index objects depencies exist. (Default.) |
DROP OWNED BY joe;
DROP OWNED BY joe, george CASCADE;
The privileges required to execute this statement are:
{{< include-md file="shared-content/sql-command-privileges/drop-owned.md" >}}