What is synonym and how do we create synonym?

What is synonym and how do we create synonym?

- Table references can be complicated. So oracle allows you create synonym for a complicated reference.

- It renames a table reference.

- Use the CREATE SYNONYM statement to create a synonym, which is an alternative name for a table, view, sequence, procedure, stored function, package, materialized view, Java class schema object, user-defined object type, or another synonym.

- Synonyms provide both data independence and location transparency.

- Synonyms permit applications to function without modification regardless of which user owns the table or view and regardless of which database holds the table or view.

- However, synonyms are not a substitute for privileges on database objects.

- Appropriate privileges must be granted to a user before the user can use the synonym.

Syntax:
CREATE SYNONYM syn_name FOR reference;

- This object can be a table, procedure, sequence or any other database object.

- A synonym is a Data Dictionary object.
What is the purpose of Synonym in oracle?
Synonym provide alias name for a table. Synonym hides name of the table..
What is an Index?
Index in oracle helps to trace the information faster just like an index in a book...
What are the objects in oracle?
Table, Views, Index, Synonym and Sequence are the objects of oracle.....
Post your comment