BIND_ARRAY v17
The BIND_ARRAY
procedure binds a value or set of values to a variable in a cursor, based on the name of the variable.
Parameters
c
Cursor ID of the cursor for the SQL command with the values to be bound.
name
Name of the collection. The name must be less than or equal to 30 bytes.
table_variable
A local variable that is declared to be one of the following datatypes:
Datatype | Description |
---|---|
<bflt_tab> | FLOAT_TABLE |
<bl_tab> | BLOB_TABLE |
<cl_tab> | CLOB_TABLE |
<c_tab> | VARCHAR2_TABLE |
<n_tab> | NUMBER_TABLE |
<tms_tab> | TIMESTAMP_TABLE |
<int_tab> | INTEGER_TABLE |
<rid_tab> | ROWID_TABLE |
<txt_tab> | TEXT_TABLE |
index1
Index for the table element that marks the lower bound of the range if you are binding a range. This value must be less than or equal to the value of index2
. All elements between index1
and index2
are used in the bind. This is an optional parameter that can be used with three parameters or five parameters but not four.
index2
Index for the table element that marks the upper bound of the range. This is an optional parameter that can be used with three parameters or five parameters but not four.
Notes
If you don't specify indexes in the bind call, and two different binds in a statement specify tables that contain a different number of elements, then the number of elements actually used is the minimum number between all tables. This is also the case if you specify indexes. The minimum range is selected between the two indexes for all tables.
Not all bind variables in a query must be array binds. Some can be regular binds, and the same value is used for each element of the collections in expression evaluations and so forth.
Example
- On this page
- Parameters
- Notes
- Example