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 Chris Miller 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 6

Status
Not open for further replies.

ajhull

IS-IT--Management
Aug 11, 2001
45
CA
I 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", What 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

Adrian
 
obviously table apples which is newly created coz table names take more preference than the synonyms
 
Just for information for ajhull if u fail a test u cannot take the same test within the 30 day period since u failed. You can take any other test at anytime.
 
actually since the synonym is in Sally's Schema it would prevail. She would see her synonym apples. Sally could get to that table by using adam.apples if adam has given her access.
The call for apples will always look in your local schema 1st followed by schemas on which you have been granted priveledges such as production.schema, etc.
 
Is Program Units as hard or harder than 1Z0-001?
I know it is more focused and less broad but is the level of detail approximately the same?
 
hi
Program Units is more focused and conceptual. It covers fewer topics then sql/pl/sql but expects more in depth knowledge of the matter
 
It is 100% correct that select will retriew records from table Apples, and not from table that user has a synonym on it.
 
does the answer not depend on which user is running the select statement ?
Best of Irish Luck, David.
djwilkes@hotmail.com
 
Advocate -
Absolutely right! If Jim runs the query and has no synonym "Apples" and he does not fully qualify the table name (either sally.apples for the synonym or adam.apples for the table), he will get an error. Likewise, if Jim has no privileges for either the table or the synonym, he will get an error.

If memory serves, if somebody issues the query
SELECT * FROM apples;
Oracle will look in the user's schema for a table/view named Apples.
If none exists, a private synonym named apples is used.
If none exists, a public synonym named apples is used.
If none exists, a "table or view does not exist" error is returned.

Elbert, CO
1425 MDT
 
how can i get free ocp developer exams to prepare my self in a good way which make me able to pass actual exams?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top