Why do we need to create an alias if we can directly use
the table name? What are the benefits of referring a table
name by its alias?

Also, when should we go for alias and when for synonyms?

Answer Posted / siva

let us consider we have a database with no of tables and one table name is ComputerScienceAndEngineering_Departement
if any one want to access this table they should use full name
ex: select * from ComputerScienceAndEngineering_Departement ;
it may be difficult to someone and sometimes to us also .
so if we creating alias like csedept then it will become simple to access it.
An alias is simply an alternate name for a table or view. Like tables and views, an alias can be created, dropped, and have comments associated with it.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by dclgen?

859


What is database reorganization?

841


Which command is used to remove all rows from a table?

789


Mention the length of physical storage of the given data types of db2 – date, timestamp, time

844


Explain about cursor stability?

792


What is alias in db2?

806


What is the cobol picture clause of the db2 data types date, time, timestamp?

843


Is db2 a programming language?

798


What is dbrm library?

799


Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?

2914


Why select is not preferred in embedded sql programs?

951


What is db2 instance?

814


What is cursor with hold option in db2?

818


Comment whether dclgen is mandatorily used. If not, then what is the point of using it?

822


What is check constraint in db2?

822