Purpose
This statement is used to drop a role.
Note
After a role is dropped, the following changes will be made:
- The role will be revoked from all users and roles that have been granted the role.
- The role will be removed from the database.
- Existing sessions that have been enabled for the role will not be affected.
- New sessions will not be able to enable the role.
Syntax
DROP ROLE role_name
Parameters
| Parameter | Description |
|---|---|
| role_name | The name of the role to be dropped. |
Examples
First, create a role named sales_manager, and then drop it.
obclient> CREATE ROLE sales_manager;
obclient> DROP ROLE sales_manager;
