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

What is isolation level in db2?

0 Answers  


What does db2 stand for?

0 Answers  


What are db2 error codes -305 and -407. What is the difference between these 2 error codes ?

1 Answers  


What is the format (internal layout) of ?TIMESTAMP??

1 Answers  


Can SQL statements/queries be included in a copybook?

2 Answers  






While creating a table, by mistake you have given size of one field as 10. But as per requirement size should be 8. What is your next step?

4 Answers   CTS, IBM,


what are the frequent DB2 abends did you encounter in your programs ?? What are different SQL abends ??

4 Answers   Xansa,


What is release/acquire in bind?

0 Answers  


I have a table(product),It contain fields(productname,cost). I want to retrieve the product name ,which cost is second maximum in the table?

10 Answers   Fidelity,


What will happen, while trying to close the closed cursor.

1 Answers  


Under what circumstances will DB2 allow an SQL statement to update more than one primary key value at a time?

1 Answers  


What is the role of the data page in the db2 database?

0 Answers  


Categories