Whatever message this page gives is out now! Go check it out!

QueryClear

Last update:
May 18, 2026

Description

Deletes all records in a query object.

Returns

An empty query object with all records deleted.

Category

Syntax

QueryClear(queryObject)
Member function
queryObject.Clear()

History

New in ColdFusion (2018 release) Update 5.

Parameters

ParameterRequired/OptionalDescription
queryObject
Required
The query object whose records are to be deleted.

See also

Example

<cfscript>
 myResult=QueryExecute("SELECT * FROM EMPLOYEES WHERE EMP_ID > 10",[],{datasource="cfdocexamples"});
 WriteOutput("Original query object")
 writedump(myResult)
 // Query clear
 QueryClear(myResult)
 WriteOutput("After applying QueryClear")
 writedump(myResult)
</cfscript>

Output

Original query object
After applying QueryClear

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page