Synonym
A synonym is another name or alternative name of the table
They are created
If table name is lengthy
To access table without owner name
Syntax:
Create synonym<name> for table name
Example
createsynonym s1 for emp
select* from s1
Dropping synonym
dropsynonym s1
Difference between view and synonym
View | Synonym |
View is a subset of a Table. | Synonym is a mirror of a Table |
View can be based on more than one table. | It is always based on one table. |
No comments:
Post a Comment
Thank you for visiting my blog