DROP ROLE
Synopsis
The DROP ROLE
deletes an existing role.
This statement is enabled by setting the YB-TServer configuration option 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
You can do this as shown below.
cqlsh:example> DROP ROLE role1;
cqlsh:example> DROP ROLE IF EXISTS role2;
See also
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .