Understanding PL/SQL Collections: Associative Arrays, Nested Tables, and VARRAYs
dev.to·4h·
Discuss: DEV
Flag this post

In the last blog post, I discussed a record, which is a composite data type. In this blog, I’ll talk about another composite data type: a collection.

According to Oracle documentation, “A collection is an ordered group of data elements, all of the same type.” A collection is a data structure similar to a list or array in other programming languages.

PL/SQL supports three types of collections: Associative arrays, Nested tables, and Varrays.

Associative Arrays These were called index-by tables in Oracle8 and Oracle8i databases. Associative arrays use arbitrary numbers or strings to look up elements, much like hash tables. They are *single-dimensional, *unbounded, and sparse collections. Associative arrays are available only in PL/SQL.

Nested Tables Nested tables are …

Similar Posts

Loading similar posts...