Object Privileges

An object privilege allows a user to perform certain actions on database objects. For example, a user can execute DML statements on tables.

Object PrivilegeAllows a User to...
SELECTPerform a select.
INSERTPerform an insert.
UPDATEPerform an update.
DELETEPerform a delete.
EXECUTEExecute a stored procedure.

Granting Object Privileges to a User

GRANT command grants an object privilege to a user.

GRANT SELECT, INSERT, UPDATE ON store.products TO tom;
GRANT SELECT ON store.employees TO tom;

The next example grants the UPDATE privilege on the last_name and sal columns to tom:

GRANT UPDATE (last_name, sal) ON store.employees TO tom;

The following example uses the GRANT option to enable a user to grant a privilege to another user.


GRANT OPTION grants an object privilege to another user, and ADMIN OPTION grants a system privilege to another user.

The SELECT ON store.employee privilege can then be granted to another user by tom. The following example connects as tom and grants this privilege to another user:

CONNECT tom/password
GRANT SELECT ON store.employee TO anotherUser;
Home »
Oracle »
User, Privilege, Role » 

Object Privileges:
  1. Object Privileges
  2. Checking Object Privileges Made, user_tab_privs_made and user_col_privs_made
  3. Checking Object Privileges Received
  4. Revoking Object Privileges