Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between SYNONYM and ALIAS?

Answers were Sorted based on User's Feedback



What is the difference between SYNONYM and ALIAS?..

Answer / venu

A table or view can be referred to in an SQL statement by
its name, by an alias that has been defined for its name, or
by a synonym that has been defined for its name. Thus,
aliases and synonyms can be thought of as alternate names
for tables and views.
An alias can be defined at a local server and can refer to a
table or view that is at the current server or a remote
server. The alias name can be used wherever the table name
or view name can be used to refer to the table or view in an
SQL statement
The differences between aliases and synonyms are as follows:

* SYSADM or SYSCTRL authority or the CREATE ALIAS
privilege is required to define an alias. No authorization
is required to define a synonym.
* An alias can be defined on the name of a table or
view, including tables and views that are not at the current
server. A synonym can only be defined on the name of a table
or view at the current server.
* An alias can be defined on an undefined name. A
synonym can only be defined on the name of an existing table
or view.
* Dropping a table or view has no effect on its aliases.
But dropping a table or view does drop its synonyms.
* An alias is a qualified name that can be used by any
authorization ID. A synonym is an unqualified name that can
only be used by the authorization ID that created it.
* An alias defined at one DB2 subsystem can be used at
another DB2 subsystem. A synonym can only be used at the DB2
subsystem where it is defined.
* When an alias is used, an error occurs if the name
that it designates is undefined or is the name of an alias
at the current server. (The alias can represent another
alias at a different server, which can represent yet another
alias at yet another server as long as eventually a
referenced alias represents a table or view.) When a synonym
is used, this error cannot occur.

Is This Answer Correct ?    15 Yes 2 No

What is the difference between SYNONYM and ALIAS?..

Answer / asr

SYNONYM - 1)It is a private object.
2)Only user who created it,can access it.
3)When the base table is dropped,automatically
sunonym wll drop.
4)SYSADM authority is not needed to create synonym

ALIAS - 1)It is a global object.
2)Any user can access it.
3)When the base table is dropped,automatically
sunonym wll not drop.
4)SYSADM authority is needed to create synonym

Is This Answer Correct ?    18 Yes 7 No

What is the difference between SYNONYM and ALIAS?..

Answer / s

SYNONYM and ALIAS are alternate names to a table. A SYNONYM
is dropped when the table is dropped whereas an alias is
not dropped if the table it is defined on is not dropped.

Is This Answer Correct ?    26 Yes 17 No

What is the difference between SYNONYM and ALIAS?..

Answer / kp

Synonym is private to the user who has defined the Synonym
and also the synonym cannnot refer to a remote table

Is This Answer Correct ?    13 Yes 4 No

What is the difference between SYNONYM and ALIAS?..

Answer / ss

YNONYM and ALIAS are alternate names to a table. A SYNONYM
is dropped when the table is dropped whereas an alias is
not dropped if the table it is defined is dropped.

Is This Answer Correct ?    6 Yes 1 No

What is the difference between SYNONYM and ALIAS?..

Answer / nandivardhanreddy.n

when the table is dropped automatically synonym is dropped
and it is a private variable.
when the table is dropped alias is not dropped because it
is invalid and it is global variable.
synonym can accesed by the user who creates it

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More DB2 Interview Questions

what happend with out using Commit,when closing cursor and program?

5 Answers   CSC,


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

1 Answers  


How to create db2 table in mainframe?

0 Answers  


Explain the contention situations caused by locks?

0 Answers  


select * from orders where odate between '2010-01-01'and '2010-03-31' How do u fetch this into cursor?

2 Answers  


Is it possible to update a primary key value? If not, what is the error code given? If yes, can more than 1 primary key column be updated at a time?

8 Answers  


If a table has a column "dept" (declared to have nulls) and there are 10 rows in the table of which 3 have a null value in the dept column, what will select count(*) and select count(distinct dept) return?

6 Answers  


What is a host variable?

3 Answers  


What is difference between *omit and *nopass?

1 Answers   IBM, TCS,


How to rename a table in DB2 ?

0 Answers   MCN Solutions,


When would you prefer to use VARCHAR?

3 Answers  


i want to delete 20th million record how ?

4 Answers   IBM,


Categories