Acts as placeholders to allow end-users to supply values to a prepared statement. These user-supplied values are then used to execute the statement.
{ ? | :name [ : indicator-name ] }
Use the placeholder character of ? or the named form in expressions. You can use input parameters whenever you can use a column name or constant.
The precise mechanism used to supply the values to the statement are dependent upon the API you use to create your UltraLite client.
Using the named form The named form of an input parameter has special meaning. In general, name is always used to specify multiple locations where an actual value is supplied.
For embedded SQL applications only, the indicator-name supplies the variable into which the null indicator is placed. If you use the named form with the other components, indicator-name is ignored.
Deducing data types The data type of the input parameter is deduced when the statement is prepared from one of the following patterns:
In this case, type is a database type specification such as CHARACTER(32).
If the type cannot be deduced, UltraLite generates an error. For example:
The following embedded SQL statement has two input parameters:
INSERT INTO MyTable VALUES ( :v1, :v2, :v1); |
The first instance of v1 supplies its value to both the v2 and v1 locations in the statement.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |