Oracle Provides two commands - GRANT and REVOKE - to control the access of various database objects.
GRANT < Object Privileges > ON <ObjectName> TO <UserName> [WITH GRANT OPTION];
Each object privilege that is granted authorizes the grantee to perform some operation on the object. A user can grant all the privileges or grant only specific object privileges.
The list of object privileges is as follows:
ALTER : Allows the grantee to change the table definition with the ALTER TABLE command
DELETE : Allows the grantee to remove the records from the table with the DELETE command
INDEX : Allows the grantee to create an index on the table with the CREATE INDEX command
INSERT : Allows the grantee to add records to the table with the INSERT command
SELECT : Allows the grantee to query the table with the SELECT command
UPDATE : Allows the grantee to modify the records in the tables with the UPDATE command
The REVOKE statement is used to deny the grant given on an object. Revokes a privilege from a user It is use to taking off or remove of authority or say getting back authority from user
REVOKE < Object Privileges > ON <Object Name> FROM <Username>;
Ask Question