DROP GROUP
- reference
- Couchbase Server 8.0
The DROP GROUP statement enables you to delete a group.
Purpose
You can use this statement to clean up groups that are no longer needed.
Deleting a group removes all roles and privileges associated with the group. Users in the deleted group no longer inherit the roles granted to it.
RBAC Privileges
To execute the DROP GROUP statement, you must have etiher the Full Admin or the Security Admin role. For more information about user roles, see Authorization.
Syntax
drop-group ::= 'DROP' 'GROUP' ('IF' 'EXISTS' )? groupname

groupname |
(Required) The unique identifier of the group you want to delete. |
IF EXISTS Clause
The optional IF EXISTS
clause enables the statement to complete successfully when the specified group doesn’t exist.
If a group with the same name does not exist, then:
-
If this clause is not present, an error is generated.
-
If this clause is present, the statement does nothing and completes without error.
Examples
sales
DROP GROUP sales;
support
if it existsDROP GROUP IF EXISTS support;
Related Links
-
To create a group, see CREATE GROUP.
-
To alter a group, see ALTER GROUP.
-
For step-by-step procedures for managing groups, see Manage Groups.