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?



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

Answer / 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

More DB2 Interview Questions

Differentiate between cs and rr isolation levels? Where do you specify them?

0 Answers  


how to unload different table data into different gdg files/ vsam files.

3 Answers  


What are the functions of Bind?

2 Answers   Amdocs, IBM,


How can deadlocks be resolved?

0 Answers  


What is a Database Request Module(DBRM)?

4 Answers  


File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?

0 Answers   Infosys,


How do I delete a column in db2?

0 Answers  


What is a collection in db2?

0 Answers  


what is the difference between join and union?

4 Answers   IBM,


What is a cursor and what is its function?

2 Answers  


I have 1000 rows in a db2 table.I want to update first 100 records,How do I do it?

4 Answers   CTS,


Where is the output of EXPLAIN stored?

2 Answers  


Categories