What are roles? How can we implement roles?
Roles in oracle restrict access to the different database objects. They are most useful when there are many database users. Once a role is created it can be granted to a user.
Example:Create a role:-Create role select_data;
Grant select on student. Employee, salary to select_data
Grant to a user:Grant select_data TO John;
Revoke a role:-Revoke select_date FROM John;
What are roles? How can we implement roles?
A role is a set or group of privileges that can be granted to users or another role.
Following examples illustrate the way to create them:
CREATE ROLE role_user1;
This example simply creates a role called test_role.
CREATE ROLE role_user2
IDENTIFIED BY pass123;
This example creates the same role and has an associated password with it.