---
title: "DROP OWNED"
url: "https://docs.yugabyte.com/stable/api/ysql/the-sql-language/statements/dcl_drop_owned/"
---

# DROP OWNED

Use the DROP OWNED statement to drop all database objects within the current database that are owned by one of the specified roles.

## 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

- [![Grammar Icon](/icons/file-lines.svg)Grammar](#grammar-1)
- [![Diagram Icon](/icons/diagram.svg)Diagram](#diagram-1)

```output.ebnf
drop_owned ::= DROP OWNED BY role_specification [ , ... ] 
               [ CASCADE | RESTRICT ]

role_specification ::= role_name | CURRENT_USER | SESSION_USER
```

#### drop\_owned

DROPOWNEDBY,[role\_specification](#role-specification)CASCADERESTRICT

#### role\_specification

[role\_name](/stable/api/ysql/syntax_resources/grammar_diagrams#role-name)CURRENT\_USERSESSION\_USER

## 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`.

```plpgsql
yugabyte=# drop owned by john;
```

## See also

- [REASSIGN OWNED](/stable/api/ysql/the-sql-language/statements/dcl_reassign_owned "REASSIGN OWNED")
- [CREATE ROLE](/stable/api/ysql/the-sql-language/statements/dcl_create_role "CREATE ROLE")
- [GRANT](/stable/api/ysql/the-sql-language/statements/dcl_grant "GRANT")
- [REVOKE](/stable/api/ysql/the-sql-language/statements/dcl_revoke "REVOKE")
