Name
ALTER GROUP
-- Modifies the structure of a user group.
Synopsis
ALTER GROUP name ADD USER username [, ... ]
ALTER GROUP name DROP USER username [, ... ]
Parameters
- name
This parameter must contain the name of an already-existing group to alter.
- username
Use this parameter to specify the names of existing users you wish
to be added or removed from the specified group.
Results
- ALTER GROUP
This message is displayed if the modification is successful.
Description
Database superusers can use the ALTER GROUP command to add
and remove specified users from a group. This is independent of the CREATE
USER and DROP USER set of commands, and
does not use them to remove the specified user account if dropped from a group; likewise,
when you add a user to a group the account must already be in existence, as this command
won't create a user account if the account is not found.
Use CREATE GROUP
to create a new group and DROP GROUP to remove a group.
Examples
The following example adds the user accounts jessica and
william to the sales
group.
ALTER GROUP sales ADD USER jessica, william;
Then we remove the newly added users.
ALTER GROUP sales DROP USER jessica, william;