Parameter Arrays - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide - 17.20

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
ODBC Driver for Teradata
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-11-18
dita:mapPath
uqj1639470627591.ditamap
dita:ditavalPath
nkw1500504256726.ditaval
dita:id
ktb1507075385726
Product Category
Teradata Tools and Utilities

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.