GRANT (System Privilege or Role)
GRANT {privilege | role}[,{privilege | role} ...]

  TO {username | rolename | PUBLIC}[,{username | rolename | PUBLIC} ...]
  [WITH ADMIN OPTION]

Grants a system privilege or role to one or more users and/or roles.

Keywords

privilege

Specifies the name of a system privilege to be granted.

role

Specifies the name of a role to be granted.

username

Specifies the name of a user to be granted a privilege or role.

rolename

Specifies the name of a role to be granted a privilege or role.

PUBLIC

Specifies that the granted privilege or role be granted to all users, including those not yet created.

WITH ADMIN OPTION

Specifies that the grantee of the privilege or role can grant the privilege or role to others, and may alter or drop the role.

Examples

Grant the account_admin role to scott and debby:

GRANT account_admin TO scott, debby;

Grant the CREATE USER and DROP USER privileges to the dba_assist role:

GRANT create user, drop user TO dba_assist;

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.