How to Perform Multiple Updates Using PL/SQL and Bulk Binds (Doc ID 728819.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version: 9.2.0.1 to 11.1.0.6 - Release: 9.2 to 11.1
Information in this document applies to any platform.
***Checked for relevance on 30-Apr-2010***

Goal

The example code demonstrates how to use collections to perform multiple updates.  The example shows how a simple FOR loop can be changed into a FORALL loop which uses BULK BINDS to bind the entire collection at once.  BULK BINDING improves the performance of the PL/SQL code because the process binds the entire collection in one operation. The collection is then passed from the PL/SQL engine to the SQL engine only once.  This cuts down on the number of context switches that happen between the PL/SQL engine and the SQL engine whenever the control of the program is passed between the PL/SQL procedural code and the SQL statement. 

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