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


Please Help Members By Posting Answers For Below Questions

How can you classify the locks in db2?

636


How can record locking be achieved in those DB2 versions which do not support it?

627


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

1597


What is bind plan?

612


What is package in cobol db2?

704






What is consistency token in db2?

641


How to check table size in db2 sap?

582


What is bind and rebind in db2?

652


How does coalesce work?

587


What is the difference between plan and package in db2?

579


i tried to copy some records from microsoft excel to as-400 physical file through "Bosanova" emulation. Out of 14000 records only 12000 records copies and subsequently programe started to hang. Then, i closed the program forcefully. I did' under stand the problem. Also when i try to compile the physical file it is showing as "The file in use". How to overcome this problem?

2047


Explain about mirror activator disk mirroring?

560


Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference

751


What is meant by dclgen?

618


What is ibm db2 connect?

574