1Z0-061 · Question #98
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…
The correct answer is D. CREATE PUBLIC SYNONYM ord FOR oe.orders; This command is issued by the database. Creating a Synonym for an Object To refer to a table that is owned by another user, you need to prefix the table name with the name of the user who created it, followed by a period. Creating a synonym eliminates the need to qualify the object name with the schema and provides…
Question
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;
Options
- ACREATE SYNONYM ord FOR orders; This command is issued by OE.
- BCREATE PUBLIC SYNONYM ord FOR orders; This command is issued by OE.
- CCREATE SYNONYM ord FOR oe.orders; This command is issued by the database administrator.
- DCREATE PUBLIC SYNONYM ord FOR oe.orders; This command is issued by the database
How the community answered
(46 responses)- A15% (7)
- B9% (4)
- C4% (2)
- D72% (33)
Explanation
Creating a Synonym for an Object To refer to a table that is owned by another user, you need to prefix the table name with the name of the user who created it, followed by a period. Creating a synonym eliminates the need to qualify the object name with the schema and provides you with an alternative name for a table, view, sequence, procedure, or other objects. This method can be especially useful with lengthy object names, such as views. PUBLIC Creates a synonym that is accessible to all users synonym Is the name of the synonym to be created object Identifies the object for which the synonym is created Guidelines The object cannot be contained in a package. A private synonym name must be distinct from all other objects that are owned by the same user. If you try to execute the following command (alternative B, issued by OE):
Topics
Community Discussion
No community discussion yet for this question.