Why
we use Synonyms in ORACLE?
A Synonym is an alias for any table, view, materialized view,
sequence, procedure, function, or package.
Synonyms are used to –
- Mask the real name and owner of a schema object
- Provide global (public) access to a schema object
- Provide location transparency for tables, views, or program units of a remote database.
- Simplify SQL statements for database users
SELECT
* FROM PRODCRM.EMPLOYEE_INSURANCE;
Now Create Public Synonym for the above Table :
CREATE
PUBLIC SYNONYM Insurance FOR PRODCRM.EMPLOYEE_INSURANCE;
After
the public synonym is created, you can query with a simple SQL statement:
SELECT * FROM Insurance;
SELECT * FROM Insurance;
Get involved
and leave your Comments in the Box Below. The more people get involved, the
more we all benefit.
So, leave your thoughts before you leave
the page.
When we drop a table, synonym is not automatically dropped. One has to take care of such a scenario.
ReplyDeleteAll synonyms for a dropped table remain, but return an error when used..
ReplyDeleteRegards,
Fahad
Thanks for this good information.
ReplyDeleteOracle Fusion HCM Training
HELLO, THANK YOU FOR VISITING MY BLOG.
ReplyDeleteENJOYED READING MY ARTICLE?
kindly Support by sharing this and making donation to :
BITCOIN : bc1qgkncx8pfu24cn8gzf4wpqv7fk5v0nvp4wm95pk
ETHER: 0x14e41D03e09Af44EeF505bb265C616075B5b668b
SHIBA INU: 0x14e41D03e09Af44EeF505bb265C616075B5b668b
BTT: 0x14e41D03e09Af44EeF505bb265C616075B5b668b
OTHER CURRENCY TO OUR MULTI COIN WALLET :0x14e41D03e09Af44EeF505bb265C616075B5b668b