Bind variables let you use the same SQL statement multiple times with different values, reducing the number of times a SQL statement needs to be parsed. For example, when you insert four rows in a table, you can parse the SQL statement once, and bind and execute the SQL statement for each row. One SQL statement can have zero or more bind variables.
To execute passthrough SQL statements with bind variables, you must:
Open a cursor.
Parse the SQL statement on the non-Oracle system.
Bind the variables.
Execute the SQL statement on the non-Oracle system.
Close the cursor.
Figure 3-1 shows the flow diagram for executing nonqueries with bind variables.
Figure 3-1 Flow Diagram for Nonquery Passthrough SQL