Name

GRANT (Object Privileges)

Synopsis

GRANT {object_priv[(column_list)][,object_priv [
(column_list) ]...] |
   ALL [PRIVILEGES] }
   {
ON
[schema.]object_name
|
   ON DIRECTORY directory_name
   }
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. ALL PRIVILEGES grants all privileges for the object that have been granted to the grantor.

column_list

Specifies one or more columns in the object to which the object privilege applies.

object_name

Specifies the name of the object on which privileges are being granted.

DIRECTORY

Specifies an Oracle8 directory (directory_name) to be granted.

username

Specifies the name of the user to whom the object privilege will be granted.

role

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

PUBLIC

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

WITH GRANT OPTION

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

Note

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

Example

The following example grants INSERT and UPDATE privileges on scott’s emp table to debby:

GRANT insert,update ON scott.emp TO debby
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset