ALTER GROUP (Databricks SQL)

Alters a group by either adding or dropping users and groups as members.

Syntax

ALTER GROUP group_name { ADD | DROP } { GROUP | USER } principal [, ...]

Parameters

  • group_name

    The name of the group to be altered.

  • principal

    A list of principals to ADD or DROP

Examples

-- Creates a group named `group1` containing a user `user1`.
CREATE GROUP group1 WITH USER user1;

-- Alters the group and add `user1_group` as a member.
ALTER GROUP group1 ADD GROUP user1_group;

-- Alters the group and drops `user1` as a member.
ALTER GROUP group1 DROP USER user1;