QuestionQ197

VerifiedCreating Other Schema Objects

Consider the following three statements:

create synonym s1 for employees;  
create public synonym s1 for departments;  
select * from s1;  

Which statement is correct?

Explanation

A private synonym in the current schema takes precedence over a public synonym with the same unqualified name. Therefore, s1 resolves to the private synonym for EMPLOYEES, assuming the required privileges are present.

Learn more

Community Discussion

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