Oracle Database 12c: SQL Fundamentals — Question 52
The ORDERS TABLE belongs to the user OE. OE has granted the SELECT privilege on the ORDERS table to the user HR.
Which statement would create a synonym ORD so that HR can execute the following query successfully?
SELECT * FROM ord;
Answer options
- A. CREATE SYNONYM ord FOR orders; This command is issued by OE.
- B. CREATE PUBLIC SYNONYM ord FOR orders; This command is issued by OE.
- C. CREATE SYNONYM ord FOR oe.orders; This command is issued by the database administrator.
- D. CREATE PUBLIC SYNONYM ord FOR oe.orders; This command is issued by the database administrator.
Correct answer: D
Explanation
The correct answer is D because a public synonym allows all users, including HR, to access the ORDERS table without specifying the owner. Options A and B create a synonym that is not public, limiting access. Option C does not create a public synonym, making it inaccessible to HR.