🎴 Flashcard Mode

SQL and Database Management

Card1 / 19
Mastered0
Review0
QuestionClick to flip

The database administrator of your company created a public synonum called HR for the HUMAN_RESOURCES table of the GENERAL schema, because many users frequently use this table. As a user of the database, you created a table called HR in your schema. What happens when you execute this query?

AnswerClick to flip back
A
You obtain the results retrieved from the HR table that belongs to you schema.
💡 Explanation:

In Oracle database name resolution, when a reference is ambiguous (could refer to a local object or a public synonym), the local schema objects take precedence. Your own HR table in your schema will be accessed instead of the public synonym HR that points to GENERAL.HUMAN_RESOURCES.

Change Mode