What is an alias and how does it differ from a synonym?

Answers were Sorted based on User's Feedback



What is an alias and how does it differ from a synonym?..

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

What is an alias and how does it differ from a synonym?..

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

What is an alias and how does it differ from a synonym?..

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

Post New Answer

More DB2 Interview Questions

how to get duplicate records from tables?write qurey for this?

4 Answers   ANZ,


Can DB2 be accessed by TSO users? If yes, which command is used to invoke DB2?

1 Answers  


What does DML stand for and what are some examples of it?

3 Answers   IBM,


What are the contents of a DCLGEN?

4 Answers   MetLife,


What is buffrpool? Where we use it ?

2 Answers   Tesco,






What is the difference between Primary key and unique index?

6 Answers  


What is a composite index and how does it differ from a multiple index?

1 Answers  


What are the two types of logging in the db2 database? Explain them.

0 Answers  


When Can you be sure that a query will return only one row?

4 Answers   IBM,


How to check table size in db2 sap?

0 Answers  


What is the database descriptor?

2 Answers  


What does the REORG Utility do?

2 Answers  


Categories