17.20 - Parameter Arrays - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

ODBC Driver for Teradata
Release Number
June 2022
English (United States)
Last Update

ODBC Driver for Teradata supports parameter arrays with limitations as described in Restrictions.

Parameter arrays are directly supported by the database as a single SQL statement with a set of parameter values. This is also called a DML array request since parameter arrays are only allowed for DML statements.

Prior to database support of DML array requests, ODBC Driver for Teradata-emulated parameter array support by executing a multi-statement request with a single SQL statement for each set of parameter values.

Such emulation is still used for multi-statement requests containing one or more statements using parameter arrays. For example, the following code executes two SQL statements in a single request:

"SELECT * from T; INSERT INTO T values(?,?)"

where INSERT uses a parameter array.

In this case, an application may want to execute the two statements separately instead of executing a multi-statement request. In other cases, the application may force the emulated mode by appending a no-operation SQL statement to surmount a restriction for DML array requests.