Link Search Menu Expand Document

DROP ROLE

Deletes a role.

For more information, see Role-based access control.

Syntax

DROP ROLE [ IF EXISTS ] <role_name>

Parameters

Parameter Description
<role_name> The name of the role.

Example

The following command will delete the role “user_role”

DROP ROLE user_role;

Example 2

The following command will delete the role “my_role_2”

DROP ROLE IF EXISTS my_role_2

If “my_role_2” does not exist, no error message is thrown.