CREATE GROUP (Databricks SQL)

Creates a group with the specified name. Optionally including the specified list of users and groups.

Syntax

CREATE GROUP group_name
  [ WITH
    [ USER user_identity [, ...] ]
    [ GROUP group_identity [, ...] ]
  ]

Parameters

  • group_name

    The name of the group to be created.

  • USER user_identity [ , … ]

    Comma separated list of user identities to include as members of the group.

  • GROUP group_identity [ , … ]

    Comma separated list of group identities to include as members of the group.

Examples

-- Create an empty group.
CREATE GROUP group1;

-- Create group2 with user1 and user2 as members.
CREATE GROUP group2 WITH USER user1, user2;

-- Create group3 with user3 and group2 as members.
CREATE GROUP group3 WITH USER user3 GROUP group2;