Considerations For Grant; Examples Of Grant - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

grantee is authid
authid specifies an authorization ID to whom you grant privileges. Authorization IDs
identify roles during the processing of SQL statements. The authorization ID must be a valid
role name enclosed in double quotes. authid is not case-sensitive.
GRANT allows two special authorization IDs called PUBLIC and SYSTEM.
PUBLIC grants the privilege to all present and future authorization IDs.
SYSTEM specifies the implicit grantor of privileges to the creator of objects. You cannot
specify SYSTEM as authid in a GRANT statement.
WITH GRANT OPTION
specifies that roles to whom privileges are granted have the right to grant the same privilege
to other roles.

Considerations for GRANT

Authorization and Availability Requirements
To grant a privilege on an object, you must have both that privilege and the right to grant that
privilege. That is, the privilege must have been issued to you implicitly (by being the owner of
an object or the owner of the schema) or explicitly by the WITH GRANT OPTION and not revoked
(owner privileges can never be revoked). If you lack authority to grant one or more of the specific
privileges, the system returns a warning (and does grant any of the specified privileges that you
do have authority to grant). If you have none of the specified privileges WITH GRANT OPTION,
the system returns an error.
Privileges on Views
Granting a privilege on a view does not grant that privilege to the corresponding column of the
underlying table.

Examples of GRANT

This example grants SELECT and DELETE privileges on a table to the two specified users
and allows these roles to grant these privileges to other roles.:
GRANT SELECT, DELETE ON TABLE sales.odetail
TO "role.role1", "role.role2" WITH GRANT OPTION;
This example grants UPDATE privileges on the named columns to PUBLIC:
GRANT UPDATE (start_date, ship_timestamp)
ON TABLE persnl.project TO PUBLIC;
GRANT Statement
137

Advertisement

Table of Contents
loading

Table of Contents