TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

DB2 - SQL Grant Statement


Grants privileges to a user to access a DB2 object.

Issued by one user to grant certain privileges on resources to another user.

The general command format is as follows.

Syntax:

GRANT privilege-list/All
    [ON resource-type resource-list] TO
    authorization-id-list/PUBLIC [WITH GRANT OPTION]

Example:

To grant SELECT privileges on the TB_STUDENT table to the user TWIN

GRANT SELECT
      ON TB_STUDENT TO USER TWIN


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal