O'Reilly logo

Oracle in a Nutshell by David C. Kreines, Rick Greenwald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Calls

PROCEDURE DBMS_SQL.BIND_ARRAY (c IN INTEGER, name IN VARCHAR2, <table_variable IN datatype> [,index1 IN INTEGER ,index2 IN INTEGER]);

Binds the table_variable array to the placeholder name in the parsed (but not executed) SQL statement in the cursor c (returned by the OPEN_CURSOR call). For Oracle8 and later, used to perform array processing. The <table_variable IN datatype> can be any of the following:

                           n_tab IN DBMS_SQL.NUMBER_TABLE
c_tab IN DBMS_SQL.VARCHAR2_TABLE
d_tab IN DBMS_SQL.DATE_TABLE
bl_tab IN DBMS_SQL.BLOB_TABLE
cl_tab IN DBMS_SQL.CLOB_TABLE
bf_tab IN DBMS_SQL.BFILE_TABLE

The optional argument index1 defines the lower bound (first row) within the table, and index2 defines the upper bound (last row). Available in Oracle8 and later.

PROCEDURE DBMS_SQL.BIND_VARIABLE (c IN INTEGER, name IN VARCHAR2, value IN {NUMBER | VARACHAR2 | DATE | BLOB | CLOB CHARACTER SET ANY_CS | BFILE} [,out_value_size IN INTEGER]);

Binds the scalar value to the placeholder name in the parsed SQL statement in the cursor c, optionally with the maximum expected size of value being out_value_size. You can also use the following syntax for variables of CHAR, RAW, or ROWID datatypes:

PROCEDURE DBMS_SQL.BIND_VARIABLE_CHAR (c IN INTEGER, name IN VARCHAR2, value IN CHAR CHARACTER SET ANY_CS [,out_value_size IN INTEGER]); PROCEDURE DBMS_SQL.BIND_VARIABLE_RAW (c IN INTEGER, name IN VARCHAR2, value IN RAW [,out_value_size IN INTEGER]); PROCEDURE DBMS_SQL.BIND_VARIABLE_ROWID (c IN INTEGER, name IN ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required