DROP ROLE
Descriptionβ
The DROP ROLE
statement is used to removes a role.
Syntaxβ
DROP ROLE [IF EXISTS] <role_name>;
Required Parametersβ
1. <role_name>
οΌ
The name of the role.
Access Control Requirementsβ
The user executing this SQL command must have at least the following privileges:
Privilege | Object | Notes |
---|---|---|
ADMIN_PRIV | USER or ROLE | This operation can only be performed by users or roles with ADMIN_PRIV permissions |
Usage Notesβ
- Deleting a role does not affect the permissions of users who previously belonged to the role. It is only equivalent to decoupling the role from the user. The permissions that the user has obtained from the role will not change.
Exampleβ
- Drop a role1
DROP ROLE role1;