Creates a role.
CREATE ROLE <rolename>;
- Important: In SQL statements passed to DSQL, omit the terminating semicolon. In embedded applications written in C and C++, and in
isql, the semicolon is a terminating symbol for the statement, so it must be included.
Name associated with the role; must be unique among role names in the database
Description: Roles created with
CREATE ROLE can be granted privileges just as users can. These roles can be granted to users, who then inherit the privilege list that has been granted to the role. Users must specify the role at connect time. Use
GRANT to grant privileges (
REFERENCES) to a role and to grant a role to users. Use
REVOKE to revoke them.
Example: The following statement creates a role called “administrator.”
CREATE ROLE administrator;