CREATE ROLE
CREATE ROLE#
Syntax#
create_role ::=#
Prerequisites#
Only the SYS user and users with the CREATE ROLE system privilege can create a role.
Description#
A new role is created with the specified name.
A set of privileges which can be granted to a user is called a role.
If a role is created for the first time, it does not have any privilege. Add privileges to a role by using the GRANT statement, then grant the role to a user.
In order for a user to use a privilege which is granted by a role, the user should re-access to the database. The privilege which can be granted to a role is a system privilege and object privilege. Further information on how to use them is delineated in examples of GRANT and REVOKE statements as well.
role_name
This is used to specify the name of the role to be created. This name must be unique within the database.
Example#
<Query> Create a role with the name alti_role.
iSQL> CREATE ROLE alti_role;
Create success.