Synonyms in Oracle
A synonym is an alias for one of the following objects:
- table
- object table
- view
- object view
- sequence
- stored procedure
- stored function
- package
- materialized view
- java class
- used defined object object type
- another synonym
The object does not need to exist at the time of its creation.
How to create synonyms ?
CREATE
SYNONYM table_name FOR table_name
How to display list of all synonyms from database ?
SELECT
ORDER BY 1,2 'SYNONYM:',synonym_name,table_owner FROM USER_SYNONYMS
or
SELECT * FROM ALL_SYNONYMS
Comments
Post a Comment