Oracle Database SQL — Question 132
Table HR.EMPLOYEES contains a row where the EMPLOYEE_ID is 109.
User ALICE has no privileges to access HR.EMPLOYEES.
User ALICE starts a session.
User HR starts a session and successfully executes these statements:
GRANT DELETE ON employees TO alice;
UPDATE employees SET salary = 24000 WHERE employee_id = 109;
In her existing session ALICE then executes:
DELETE FROM hr.employees WHERE employee_id = 109;
What is the result?
Answer options
- A. The DELETE command will wait for HR’s transaction to end then return an error.
- B. The DELETE command will immediately delete the row.
- C. The DELETE command will wait for HR’s transaction to end then delete the row.
- D. The DELETE command will immediately return an error.
Correct answer: D
Explanation
The DELETE command will return an error because ALICE does not have the necessary privileges to delete from HR.EMPLOYEES, despite the GRANT statement issued by HR. The other options incorrectly suggest that the DELETE command will succeed or wait for the transaction to complete, which is not possible without the required permissions.