Collections in PL/SQL make it easy for you to implement lists, arrays, stacks, queues, etc. They come in three flavors: associative arrays, nested tables, and varrays. The three types of collections share many features, and also have their own special characteristics. Here are some tips for making the most of collections. At the bottom of the post, I offer links to a number of resources for diving in more deeply on collections. You Can Query From Collections Collections are, for the most part, variables you will declare and manipulate in PL/SQL. But you can query from them using the TABLE operator (and in 12.2 and higher you even leave off that operator). Use this feature to: Manipulate table data and in-session collection data within a single SELECT. Use the set-oriented power of SQL on your in-session data. Build table functions (functions that return collections and can be called in the FROM clause of a query. Here's a simple demonstration: CREATE OR REPLA
For the last twenty years, I have managed to transform an obsession with PL/SQL into a paying job. How cool is that?