See also

Parameters

Parameter

Description

columnlist

Comma-delimited list of column names, or an empty string.

columntypelist

(Optional) Comma-delimited list specifying column data types. ColdFusion generates an error if the data you add to the column is not of this type, or if it cannot convert the data to this type. The following data types are valid:

A struct with key/value pairs representing a single row of data, where the key is the column name and the value is the data;

an array of structs as per above, for adding multiple rows of data;

an array of arrays where each inner array are values for a row of data, in the same order as the columns are specified in the columntypelist parameter.

See "Usage" for examples.

Usage

If you specify an empty string in the columnlist parameter, use the QueryAddColumn function to add columns to the query.Adobe recommends that you use the optional columntypelist parameter. Without this parameter, ColdFusion must try to determine data types when it uses the query object in a query of queries. Determining data types requires additional processing, and can result in errors if ColdFusion does not guess a type correctly.Enhancements in ColdFusion 10 lets you initialize the query data. You can specify a struct, an array of structs, or arrays with single or multiple dimensions to initialize the query as shown in the following example: