※This sample exam is different from those that appear in the actual OSS-DB Exam.
2019/03/04
GRANT is used to control authorization to objects in a database. The basic syntax of the GRANT statement is
GRANT (authority to grant) ON (target object) TO (grantee);
As a grantee, specify user name and role name individually. You can also assign privileges to all users by specifying PUBLIC.
Use REVOKE to deprive the granted privileges. It has a similar structure as the GRANT statement except we say FROM instead of TO
The third REVOKE statement in the example deprives SELECT authority from foo, but it should be noted that this concerns privileges granted individually to foo. In the example, we do not GRANT SELECT individually on foo, so nothing actually happens (it does not cause an error). Permissions granted to PUBLIC continue to be valid.
Therefore, the correct answer is D.