What technique is used to retrieve data from more than one
table in a single SQL statement?
Answer Posted / mani
Both UNION or UNION ALL and JOIN can be used.
The purpose of retreiving data from more than one table in a
single statement generally happens when the ouput of the
involved tables has same table structure and in this case
either UNION (to eliminate the duplicates in the resultant
table)or UNION ALL (to retain the duplicates in the
resultant table)could be used.
If retrieval is based on seletion criterion then JOINS could
also be used but here the resultant table structure can be
different from that of the tables involved in join operation.
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Is db2 a mainframe database?
What is db2 connect?
What is the maximum size of varchar data type in db2?
How do I add a column to an existing table in db2?
Explain packages.
What is data manager?
How to check last update on table in db2?
What is drop table?
What is db2 and what is the use of db2 optimizer?
Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?
Which components manage deadlocks in db2?
What is the connection string to connect to the DB2 Database ?
Following a db2 update statement, what is the quickest way to compute the total number of updated rows?
What is the max length of sqlca?
What is nvl in db2?