Oracle Magazine, May/June 2019
Database Developer PL SQL ORACLE MAGAZINE MAY JUNE 2019 84 55 555 5555 In case youre wondering you cannot use named notation with the constructor function of a nested table or varray If you try to do so the PL SQL compiler will reject it with a PLS 00306 wrong number or types of arguments in call error Thats not too surprising since nested tables and varrays are always populated densely from index value 1 This means that there are no undefined gaps between the lowest and the highest defined index values This is an initial requirement you can introduce a gap between values in a nested table later using the DELETE method Values in associative arrays on the other hand can be dense or sparse with at least one undefined index value between the lowest and the highest This is especially and obviously the case for string indexed associative arrays nested tables and varrays support only integer indexes So with qualified expressions for associative arrays you can specify whatever index values youd like For example DECLARE TYPE ints_ t IS TABLE OF INTEGER INDEX BY PLS_ INTEGER l_ ints ints_ t ints_ t 600 55 5 555 200000 5555 l_ index pls_ integer l_ ints first
You must have JavaScript enabled to view digital editions.