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
My sql statement select avg(salary) from emp yields inaccurate results. Why?
What are types of indexes?
What is temporal table in db2?
What is a system catalog table in db2?
What is commit in db2?
What is the physical storage length of date data type?
What is the use of value function?
Is db2 a programming language?
What is the use of commit in db2?
How can record locking be achieved in those DB2 versions which do not support it?
How to execute stored procedures?
Explain the contention situations caused by locks?
I HAVE 500 ROW TO UPDATE I WOULD LIKE TO USE ROLLBACK ALONG WITH COMMIT.WHAT IS THE SYNTAX TO CODE COMMIT AND ROLLBACK FOR EVERY 100 ROWS.AND HOW THE CURSOR ROLLBACK TO THE LAST COMMITTING POINT.
have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.
What is the difference between plan and package in db2?