nerdexam
Oracle

1Z0-007 · Question #137

The database administrator of your company created a public synonym called HR for the HUMAN_RESOURCES table of the GENERAL schema, because many users frequently use this table. As a user of the…

The correct answer is B. You obtain the results retrieved from the HR table that belongs to your schema. By executing this query you will extract data from the HR table in your own schema, it will not work with HR synonym for the HUMAN_RESOURCES table of the GENERAL schema. Incorrect Answers A: The results will be retrieved from the table in your own schema, not from the GENERAL…

Creating and Managing Schema Objects

Question

The database administrator of your company created a public synonym 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? SELECT * FROM HR;

Options

  • AYou obtain the results retrieved from the public synonym HR created by the database administrator.
  • BYou obtain the results retrieved from the HR table that belongs to your schema.
  • CYou get an error message because you cannot retrieve from a table that has the same name as a
  • DYou obtain the results retrieved from both the public synonym HR and the HR table that belongs to
  • EYou obtain the results retrieved from both the public synonym HR and the HR table that belongs to

How the community answered

(28 responses)
  • B
    79% (22)
  • C
    4% (1)
  • D
    7% (2)
  • E
    11% (3)

Explanation

By executing this query you will extract data from the HR table in your own schema, it will not work with HR synonym for the HUMAN_RESOURCES table of the GENERAL schema. Incorrect Answers A: The results will be retrieved from the table in your own schema, not from the GENERAL schema, using synonym HR. C: There is no error: data from the table in your own schema will be retrieved by this query. D: This query will not generate Cartesian product from both tables. E: This query will not retrieve data from both tables as a FULL JOIN.

Topics

#public synonym#schema name resolution#object name precedence#user schema

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice