Are Oracle PL/SQL arrays indexed from 0 or from 1? Are Oracle PL/SQL arrays indexed from 0 or from 1? oracle oracle

Are Oracle PL/SQL arrays indexed from 0 or from 1?


An associative array isn't necessarily dense. There may be an element at index 0, there may be an element at index -1, there may be an element at index 1. Or you might have elements at indexes 17, 42, and 127. The code you posted implies that the associative array is dense and that the indexes start at 1.

In the specific case of apex_plugin_util.get_data the collection should be dense and should start at 1. If the loop is actually not doing anything other than what you posted, you could replace it by fetching the last element of l_RowSet(1), i.e.

l_a_variable := l_RowSet(1)(l_RowSet(1).count);