Perform a SELECT with BULK COLLECT INTO a Nested Table with a WHERE clause that also uses a Nested Table of values.

(Doc ID 758144.1)

Last updated on AUGUST 29, 2017

Applies to:

PL/SQL - Version 9.2.0.8 and later
Information in this document applies to any platform.
***Checked for relevance on 24-Aug-2017***


Goal

This article demonstrates how to perform a BULK COLLECT into a Nested Table (sometimes referred to as an Array) where the SELECT statement has a WHERE clause with an equality condition (=) which also references another Nested Table. (The term Nested Table and Array are used interchangeably here.)

Basically, something like this:

 select bulk collect emp_name into :EMP_ARRAY from EMP_TBL where DEPT_ID = :DEPT_ARRAY;

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms