Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Program Units Question 1

Status
Not open for further replies.

ajhull

IS-IT--Management
Aug 11, 2001
45
CA
I took failed by 1 point the Program Units Exam and I am retaking it in a weeks time. There was one question that stumps me that I am hoping someone could answer...

If a synonym is created by user Sally named "Apples" and then user Adam decides to create a table called "Apples", was is the result? What will happen when a user performs the following:

Select * from Apples;

Will it select from the table represented by the synonym or from the table "Apples"?

Thanks

Steffen
 
Which user is doing the select? If Adam already has a synonym called Apples the table won't create in the first place. will get ORA-00955: name is already used by an existing object. If the table creates then Adam will see his own table. If Sally does the select then the table that is used for the select depends on what table the synonym was created for. ie. if the synonym was for a table apples created by a third person then this will be the table used.

Anthony.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top