Data Control Language (DCL)

Each relational database management system provides different levels of granularity for the GRANT and REVOKE SQL statements. To grant privileges on most database objects, the user must have SYSADM authority, DBADM authority, or CONTROL privilege on that object. Otherwise, the user must hold the same privilege WITH GRANT OPTION. Privileges can be granted only on existing objects. The REVOKE statement allows authorized users to revoke privileges previously granted to other users. The following examples grants and revokes SELECT privileges on the EMPLOYEE table to the user STEVE:

GRANT SELECT ON EMPLOYEE TO USER STEVE
REVOKE SELECT ON EMPLOYEE FROM USER STEVE

Several forms of the GRANT statement exist depending on the ...

Get DB2® Universal Database™ v8 Application Development Certification Guide, 2nd Edition 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.