CREATE GROUPSection: SQL Commands (7)Updated: 2003-11-02 |
CREATE GROUPSection: SQL Commands (7)Updated: 2003-11-02 |
CREATE GROUP name [ [ WITH ] option [ ... ] ]
where option can be:
SYSID gid
| USER username [, ...]
CREATE GROUP will create a new group in the database cluster. You must be a database superuser to use this command.
Use ALTER GROUP [alter_group(7)] to change a group's membership, and DROP GROUP [drop_group(7)] to remove a group.
If this is not specified, the highest assigned group ID plus one, starting at 1, will be used as default.
Create an empty group:
CREATE GROUP staff;
Create a group with members:
CREATE GROUP marketing WITH USER jonathan, david;
There is no CREATE GROUP statement in the SQL standard. Roles are similar in concept to groups.