DROP ROLE
Synopsis
Use the DROP ROLE
statement to delete an existing role.
This statement is enabled by setting the YB-TServer flag use_cassandra_authentication
to true
.
Syntax
Diagram
drop_role
Grammar
drop_role ::= DROP ROLE [ IF EXISTS ] role_name
Where
role_name
is a text identifier.
Semantics
- An error is raised if
role_name
does not exist unless IF EXISTS option is present. - Only a role with the
SUPERUSER
status can delete anotherSUPERUSER
role. - Only a client with the permission
DROP
onALL ROLES
or on the specifiedrole_name
, or with theSUPERUSER
status can delete another role.
Examples
ycqlsh:example> DROP ROLE role1;
ycqlsh:example> DROP ROLE IF EXISTS role2;