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
    Syntax diagram: refer to source code listing
    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

    Example 1. Delete a group named sales
    DROP GROUP sales;
    Example 2. Delete a group named support if it exists
    DROP GROUP IF EXISTS support;