DB2 Data Control Language
- Data Control language is used for controlling of data by giving/revoking the access to retrieve the data based on the levels at users group level or individual user level
- One of the main advantages of DCL is, User groups can be restricted by revoking the access for the sensitive data.
- DCL has mainly two statements
1. GRANT 2. REVOKE
GRANT statement is used to give the permissions which also used to add the additional permissions to users which already created earlier.
GRANT [statement] ON [DB_OBJECT] TO PUBLIC/Group-of-users
GRANT SELECT ON TABLE1 TO PUBLIC
In the above example, the query will give the SELECT access to all users which will have retrieve access to table existed database.
REVOKE statement is used to revert the access which is granted earlier.
It is also used to REVOKE the userid’s which are currently working.
REVOKE [statement] ON [DB_OBJECT] TO PUBLIC/Group-of-users
REVOKE SELECT ON TABLE1 TO PUBLIC
If any questions on the above, post your queries on DB2 Discussion forum
Transaction Control Language JOIN Statement