In: Computer Science
Suppose there are three users: DBA, user1, user2, user3. Please specify whether user1, user2, user3 have update privilege on checking and saving table after execution of the following SQL statements.
DBA:
Grant update on checking to user1 with grant option;
Grant update on checking to user2 with grant option;
Grant update on saving to public;
Grant update on saving to user2 with grant option;
User1:
Grant update on checking to user3;
User 2:
Grant update on checking to user3;
Grant update on saving to user3;
DBA:
Revoke update on checking from user1;
Revoke update on saving from public;
Step 1:- In first query DBA provides update privilege to user1 on checking table.
Step 2:- In second query DBA provides update privilege to user2 on checking table.
Step 3:- In third query DBA provides update privilege on saving table to all users.
Step 4:- In fourth query DBA provides update privilege to user2 on saving table.
Step 5:- In fifth query user1 provides update privilege to user3 on checking table.
Step 6:- In sixth query user2 provides update privilege to user3 on checking table.
Step 7:- In seventh query user2 provides update privilege to user3 on saving table.
Step 8:- In eighth query DBA revokes access from user1 from checking table.
Step 9:- In ninth query DBA revokes access from all users from saving table.
Conclusion