I have a PLSQL function that populates and returns a nested table:
select distinct id bulk collect into my_nested_table
from user
order by id;
return my_nested_table;
According to the docs nested tables are multisets and have no inherent ordering.
Can I nevertheless assume that the nested table returned from the function above will be ordered by id(as the select
statement implies) and retain that order as long as I don't store it in the DB?
Providing a link to documentation is a plus. :)
First of all you should know, what is
NESTED TABLE
According to Oracle Doc
It's one-column table, which has behaviour of
array
, but they are unbounded (size can increase dynamically). Moreover, initiallyNESTED TABLE
are dense in nature but later they became sparse (once you remove any element from it).