DB2 Everyplace supported parameter markers

A parameter marker, denoted by a question mark (?), is a place holder in an SQL statement whose value is obtained during statement execution. An application uses SQLBindParameter() to associate bind parameter markers to application variables. During the execution of the SQLExecute() and SQLExecDirect() DB2 CLI functions, the values of these variables replace each respective parameter marker. Data conversion might take place during the process. See ǥ 86 for more information on the supported data type conversions.

DB2 Everyplace supports only untyped parameter markers, which can be used in selected locations of an SQL statement. ǥ 19 lists the restrictions on parameter marker usage.

ǥ 19. Restrictions on parameter marker usage

Untyped parameter marker location Data type
Expression: Alone in a select list Error
Expression: Both operands of an arithmetic operator Error
Predicate: Left-hand side operand of an IN predicate Error
Predicate: Both operands of a relational operator Error
Function: Operand of an aggregation function Error

Related reference