Question 1
The role `HR_READER` already exists. You must let that role query every column of `EMPLOYEES` and update only its `SALARY` column, using a single statement. Which statement does this?
A. GRANT SELECT (emp_id, salary), UPDATE (salary) ON employees TO hr_reader;
Assumes a column list may follow any object privilege. GRANT permits a column list only with INSERT, REFERENCES, and UPDATE — never with SELECT (column-level read is done with a view), so the SELECT (emp_id, salary) clause makes the statement fail to parse.
B. GRANT SELECT, UPDATE ON employees (salary) TO hr_reader;
Attaches the column list to the object instead of to the privilege. In the on_object_clause the table name stands alone; the column list belongs to the privilege that restricts it, so this is invalid syntax and would in any case say nothing about which of the two privileges is column-limited.
C. GRANT SELECT, UPDATE (salary) ON employees TO hr_reader;Correct answer
Correct. Several object privileges may be listed in one GRANT, and a column list binds to the privilege it immediately follows — so SELECT is granted on the whole table while UPDATE is restricted to SALARY. The grantee_clause names the role directly (Oracle GRANT, object privileges).
D. GRANT SELECT, UPDATE (salary) ON employees TO ROLE hr_reader;
Invents a ROLE keyword in the grantee clause. GRANT's grantee_clause accepts bare user names, role names, or PUBLIC — Oracle resolves the name itself — so the extra keyword is a syntax error.
Explanation
Object privileges may be listed together in one GRANT, and a parenthesised column list applies to the privilege it directly follows, not to the table named in the ON clause. Only INSERT, REFERENCES, and UPDATE accept a column list; a column-limited SELECT is expressed with a view instead. The grantee is written as a plain name, with no keyword distinguishing a role from a user.