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

Hi this is sures. i need to practice the ibm mainframes.could u telme how can i get userid from IBM.how much cost they will collect for one user id.can send me the details please.thanq

2 Answers  


What is the COBOL picture clause of the following DB2 data types: DATE, TIME, TIMESTAMP?

3 Answers  


What is cursor stability?

1 Answers  


ther r 2 tables OTTABLE & SALTABLE, add the otamt from OTTABLE to empsal of SALTABLE if eid is matched else add the unmatched from OTTABLE to SALTABLE

0 Answers  


What is image copy in db2?

0 Answers  






what is the name of the default db2 catalog database?

3 Answers   IBM,


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 is the physical storage length of timestamp data type?

0 Answers  


What are the contents of a DCLGEN?

4 Answers   MetLife,


Explain the contention situations caused by locks?

0 Answers  


Comment whether the cursor is closed during commit or not.

0 Answers  


What is an instance in db2?

0 Answers  


Categories