views:

39

answers:

1

Can anybody Explain me why records are required. Can't we perform the same operation in pl/sql using loop and all. Also when multiset, records query can be used i.e. in which type of situation and which one will be the preference.

+2  A: 

Here is a great link on this topic: http://www.oracle.com/technology/oramag/oracle/03-sep/o53plsql.html

Read the part about "Set Theory and Multiset Union".

It more or less works like UNION ALL, with one important difference:

"Unlike the SQL UNION set operator, the collection MULTISET UNION operator does not reorder the elements in the resulting collection. MULTISET UNION preserves the order in each collection and simply appends the contents of the second after the first. ".

dcp
+1 for link to useful article.
DCookie