Which statement would create a synonym ORD so that HR can execute the following query successfully?

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;

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;

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.



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Justyna

Justyna

Create synonym is not a default or standard privilege that you give to database user. Because of security reason you do not grant it to any user. So probably in the question is established that OE does not have that privilege.
The another thing is: it is needed to do select * from ord
not select * from oe.ord os it cannot be ‘private’ synonym of user OE.

saurabh

saurabh

If you are granting select on table to some user.

And later if you will create synonym for that table. Then the other user will be able to access that synonym also.

For e.g

SQL> grant select on test to sandeep;

Grant succeeded.

SQL> create synonym te for test;

Synonym created.

SQL> conn
Enter user-name: sandeep
Enter password:

SQL> select * from test1.te;

PROD_ID PROD_PRICE
———- ———-
101 21324314
102 21424314

So the option A is correct.

snack

snack

i don’t think so, because query clause is : select * from ord (not include schema name)