GRANT (Object Privileges)
GRANT {object_priv[,object_priv ...] | ALL [PRIVILEGES]}
  ON {[schema.]object_name |
      DIRECTORY directory_name |
      JAVA {SOURCE | RESOURCE} [schema.]java_object
     }
  TO {username | role | PUBLIC}
  [WITH GRANT OPTION]

Grants privileges on a database object to one or more users or roles.

Keywords

object_priv

Specifies the name of the object privilege to be granted. Valid privileges are: ALTER, DELETE, EXECUTE, INDEX, INSERT, REFERENCES, SELECT, and UPDATE.

object_name

Specifies the name of the object on which privileges are to be granted.

DIRECTORY

Specifies the name of a directory object on which privileges are to be granted.

JAVA SOURCE

Specifies the name of a Java source object on which privileges are to be granted.

JAVA RESOURCE

Specifies the name of a Java resource object on which privileges are to be granted.

username

Specifies the name of the user who will be granted the object privilege.

role

Specifies the name of a role that will be granted the object privilege.

PUBLIC

Specifies that the object privilege be granted to all current and future users.

WITH ADMIN OPTION

Specifies that the grantee of the privilege can grant the privilege to others.

The object must be in your schema, or you must have been granted the object privileges with the GRANT OPTION.

Example

Grant INSERT and UPDATE privileges on scott's emp table to debby:

GRANT insert, update ON scott.emp ...

Get Oracle SQL: the Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.