GRANT

The GRANT statement give privileges to a specific user or role, or to all users.

A privilege is a special right or permission granted to a user or a role to perform actions on Oracle RDBMS objects.

You can also use the GRANT statement to grant a role to a user, to PUBLIC, or to another role.

system privileges:

GRANT systemprivileges TO {user, | role, |PUBLIC} [IDENTIFIED BY password] [WITH ADMIN OPTION];

object privileges:

GRANT objectprivileges ON objectname TO {user, | role, |PUBLIC};

Example 1:

GRANT CREATE SESSION TO username;

Example 2:

GRANT SELECT, INSERT, UPDATE, DELETE ON country TO username;

Example 3:

GRANT SELECT ON country TO PUBLIC;

Privilege List:

Tables: select, insert, update, delete, alter, debug, flashback, on commit refresh, query rewrite, references, all

Views: select, insert, update, delete, under, references, flashback, debug

Sequence: alter, select

Packeges, Procedures, Functions (Java classes, sources…): execute, debug

Materialized Views: delete, flashback, insert, select, update

Directories: read, write

Libraries:execute

User defined types: execute, debug, under

Operators: execute

Indextypes: execute