Quote:
Originally posted by shev
Thanks andrewst.
I have further question on the PL/SQL collection type.
How can I check if the input index-by table is null or not?
I have looked into the documentation and I can only find ways to check nullity of nested table and varray but not index-by table. It simply adds the line "IF ... IS NULL THEN...". I have tried to apply it in my code but seems not working properly. Could you please give me some advice?
Also, what is the meaning of "atomically null"?
Please don't mind if I am asking simple question.
|
You mean the whole collection is empty, or is not empty but all values are NULL?
To test if it is empty you can say:
IF array.COUNT = 0 THEN ...
I don't know of any way to test whether all values in a non-empty index-by table are NULL, except by looping and testing each one.
Atomically null means that you can test the collection for null as an "atomic" item, i.e. IF collection IS NULL. Doesn't work for index-by tables.