Granting Roles to a User
You grant a role to a user using GRANT
.
The following example grants the secondRole role to tom:
CREATE ROLE secondRole IDENTIFIED by password;
GRANT SELECT, INSERT, UPDATE, DELETE ON employee TO firstRole;
GRANT SELECT, INSERT, UPDATE, DELETE ON products TO firstRole;
GRANT firstRole TO secondRole;
GRANT secondRole TO tom;