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

Is db2 a programming language?

606


What is bind in db2?

604


How do you concatenate the firstname and lastname from emp table to give a complete name?

601


What is the difference between drop table and delete table?

550


Explain about dbrm.

607






what is the responsibility of the construction superintendent

1662


What are union and union all?

538


What is the syntax for seeing the columns and data types of a table in the db2 database?

578


How to check sequence on a table in db2?

600


What is the difference between db2 and oracle?

677


How to compare data between two tables in db2?

658


What is the maximum No of rows per page?

626


Can one database have multiple instances?

583


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

616


What are packages in db2?

596