CREATE GROUP

Name

CREATE GROUP  --  Creates a new user group within the database.

Synopsis

CREATE GROUP name
    [ WITH 
     [ SYSID gid ]
     [ USER  username [, ...] ] ]
  

Parameters

name

This parameter takes the name of the new group to create.

gid

You may use this parameter to enter the group ID of the new group. If you do not explicitly specify the group ID, it will automatically be calculated as one higher than the highest group ID currently in use.

username

Use this parameter to list the users you wish to include in this group.

NoteNote
 

The users you list in this parameter must already exist within the database.

Results

CREATE GROUP

This message is displayed if the group is created successfully.

Description

Use CREATE GROUP to create a new group in the database installation. To do this you will need to be a database superuser.

To modify a group (and the list of users that it is composed of it), use ALTER GROUP. If you wish to remove a group entirely, use the DROP GROUP command.

Examples

The following example creates an empty group named management.

CREATE GROUP management;

You may alternatively create a group and add users to to it by specifying their usernames.

CREATE GROUP accounting WITH USER jessica, william;