What is an alias and how does it differ from a synonym?
Answers were Sorted based on User's Feedback
Answer / guru
Alias & Synonyms are alternate of table or a view.
ALIAS SYNONYM
1. it is a global object. 1. it is aprivate object.
2. any one can access the 2. but the one who create
alias. the alias can only
access it.
3.when the base table is
droped.Alias is not dropped. 3. when the base table is
droped.SYNONYM is dropped
automatically.
| Is This Answer Correct ? | 19 Yes | 3 No |
Answer / krishna kant kumar
Alias is used in present session only but synonym is used in next session also because it is a database object.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / yogendra shinde
Hi,
Alias and Synonym both are alternative names to a table
name. But the major difference between Alias and Synonym is
that
>>>Alias can be used to refer a table at different location
( meaning different or remote system and it is not provate
to user who has created it)
>>> Synonym is used to refer table in the same location
with different name. Synonym is very much provate to the
user who has created it.
>>> Regarding dropping ALIAS and SYNONYM I am doubtful.
I have read that if we drop base table or base view then
both alias and synonym are also dropped (As per C.J.DATE
DB2 version 4.0). Please update if anybody has more on this.
| Is This Answer Correct ? | 4 Yes | 8 No |
What are common abends
What DB2 Catalog column tell you when an index needs table reorganized ?
Plan is an executable form of sql statements,But what exactly resides inside a Plan. what are the details inside Plan.
How do you pull up a query which was previously saved in qmf?
Where is the output of EXPLAIN stored?
How to create db2 table in mainframe?
I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.
When do you specify the isolation level? How?
What is package versioning? Please give an example.
In terms of DB2 indexing, what is the root page?
What does the REORG Utility do?
What is correlated subquery?