The CREATE ROLE statement allows you to create an SQL role.
Only the
For more information on roles, see "Using SQL roles" in the
Before you issue a CREATE ROLE statement, verify that the
You cannot create a role name if there is a user by that name. An attempt to create a role name that conflicts with an existing user name raises the SQLException X0Y68.
If user names are not controlled by the database owner (or administrator), it may be a good idea to use a naming convention for roles to reduce the possibility of collision with user names.
A role name cannot start with the prefix SYS (after case normalization). The purpose of this restriction is to reserve a name space for system-defined roles at a later point. Use of the prefix SYS raises the SQLException 4293A.
You cannot create a role with the name
The following example uses the convention of giving every role name the
suffix