Use this tag to write structured query language (SQL) queries that are passed on to your database through the datasource name. SQL statements within this tag are executed just as they are written and can be used to select, insert, update, or delete data.
Name of the query. This query name will be referenced throughout the application to utilize the data.
Name of datasource from which the query retrieves data.
Overrides username specified in the ColdFusion Administrator for the datasource.
Overrides password specified in the ColdFusion Administrator for the datasource.
Default: -1 (All). Maximum number of rows to return in the recordset.
Default: 1. Maximum rows to get at one time from the server. The range is from 1 100. This can be used to make the query more efficient.
Maximum number of seconds that each action of a query is permitted to execute before returning an error.
If query caching is enabled, then ColdFusion retrieves the data from the cache if the current date is after the specified date. Year values in the range 0-29 are interpreted as 2000-2029; in the range 30-99, they are interpreted as 1930-1999. Values in the range 100 9999 are interpreted as absolute A.D. dates.
Time span, using the CreateTimeSpan function. If original query date falls within the time span, the cached query data is used. CreateTimeSpan defines a period from the present back. Takes effect only if query caching is enabled in the Administrator. To use cached data, the current query must use the same SQL statement, datasource, query name, username, password, and dbType.
debug (Optional); value and equals sign may be omitted
Yes. or if value is omitted. If debugging is enabled, but the Administrator Database Activity option is not enabled, displays SQL submitted to datasource and number of records returned by query.
No. If the Administrator Database Activity option is enabled, suppresses display.