A role is a named list or group of privileges that are collected together and granted to users or other roles.
CREATE ROLE rolename
[ NOT IDENTIFIED |
IDENTIFIED {BY password | USING [schema.] package | EXTERNALLY | GLOBALLY } ;
Example 1:
CREATE ROLE myrole;
GRANT create session TO myrole;
GRANT create table TO myrole;
GRANT myrole TO username;
Example 2:
CREATE ROLE myrole NOT IDENTIFIED;
GRANT create session TO myrole;
GRANT create table TO myrole;
GRANT myrole TO username;
Example 3:
CREATE ROLE myrole IDENTIFIED BY rolepass;
GRANT create session TO myrole;
GRANT create table TO myrole;
GRANT myrole TO username;