1Z0-061 · Question #281
SLS is a private synonym for the SH.SALES table. The user SH issues the following command: DROP SYNONYM sls; Which statement is true regarding the above SQL statement?
The correct answer is A. Only the synonym would be dropped. A synonym is an alias for a table (or a view). Users can execute SQL statements against the synonym, and the database will map them into statements against the object to which the Private synonyms are schema objects. Either they must be in your own schema, or they must be…
Question
SLS is a private synonym for the SH.SALES table. The user SH issues the following command:
DROP SYNONYM sls; Which statement is true regarding the above SQL statement?
Options
- AOnly the synonym would be dropped.
- BThe synonym would be dropped and the corresponding table would become invalid.
- CThe synonym would be dropped and the packages referring to the synonym would be dropped.
- DThe synonym would be dropped and any PUBLIC synonym with the same name becomes invalid.
How the community answered
(63 responses)- A83% (52)
- B2% (1)
- C5% (3)
- D11% (7)
Explanation
A synonym is an alias for a table (or a view). Users can execute SQL statements against the synonym, and the database will map them into statements against the object to which the Private synonyms are schema objects. Either they must be in your own schema, or they must be qualified with the schema name. Public synonyms exist independently of a schema. A public synonym can be referred to by any user to whom permission has been granted to see it without the need to qualify it with a schema name. Private synonyms must be a unique name within their schema. Public synonyms can have the same name as schema objects. When executing statements that address objects without a schema qualifier, Oracle will first look for the object in the local schema, and only if it cannot be found will it look for a public synonym.
Topics
Community Discussion
No community discussion yet for this question.