DB2 graphic  QMF Version 8

GRANT

The GRANT statement gives users authorization to perform one or more operations on a table. You must be authorized to INSERT, UPDATE, DELETE, ALTER, or SELECT rows in a table you do not own. Authorization must be granted by the creator of the table or by someone to whom the creator granted such authorization. (See also REVOKE.)

The syntax of the GRANT statement is:

GRANT operation-list ON tablename
TO user-list WITH GRANT OPTION

operation-list
One or more of the following, separated by commas: ALTER, DELETE, INSERT, SELECT, UPDATE (column-list)- ALL grants authorization to do all operations.
tablename
Names a table or view for which the authorization is granted
user-list
Lists each user ID with commas between- PUBLIC can be specified in place of user-list to grant authorization to all users.
WITH GRANT OPTION SQL keyword
Authorizes another user to use the GRANT keyword to grant the same authorization to other users- It is optional.

This statement:

GRANT SELECT ON PERS TO PUBLIC

Grants authorization to all other users to write SELECT queries using table PERS

This statement:

GRANT INSERT, DELETE ON PERS TO HSAM4419

Grants authorization to user HSAM4419 to insert and delete rows in PERS

This statement:

GRANT UPDATE ON PERS TO SMITH WITH GRANT OPTION

Grants authorization to SMITH to update PERS and to grant this authorization to other users

For more information on granting authorization, see the appropriate Installing and Managing QMF manual.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004