Comparing CAST (multiset) with Bulk Collect [message #658433] |
Wed, 14 December 2016 00:38 |
|
OraFerro
Messages: 433 Registered: July 2011
|
Senior Member |
|
|
Dear All,
This is a general question regarding two techniques that can be used in a PLSQL select statement to fill a table of object:
1- Using:
RETURN My_TABLE As MTable MY_TABLE;
CAST(MULTISET(
-- SELECT ... select statement here
) AS My_TABLE) INTO MTable FROM DUAL;
2- Using:
SELECT OBJ_My_Object( --Object definition
)
BULK COLLECT INTO My_Table
FROM
(
-- SELECT ... select statement here
)
Please not that the code provided is just an example to ask for your preference and advice as I found little sources on the internet that actually compares between the two techniques.
Thanks,
Ferro
|
|
|
|
|
|
|