QuestionQ233

VerifiedCreating Other Schema Objects

Mary owns a view named EMP_DEPT_LOC_VU, created from the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She has the privilege to create a public synonym and wants to create a synonym for this view that all database users can use.

Which SQL statement can Mary use to accomplish this task?

Explanation

A public synonym is created with CREATE PUBLIC SYNONYM synonym_name FOR object_name. The PUBLIC keyword makes the synonym available to all users, and FOR emp_dept_loc_vu identifies Mary's view. Users still require appropriate privileges on the underlying view to access it.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!