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

QueryDeleteColumn

Last update:
May 18, 2026

Description

Removes a column from a query object.

Returns

Modified query object after the deletion of the specified column.

Category

Syntax

QueryDeleteColumn(Query queryObject, String columnName)

History

New in Adobe ColdFusion (2018 release).

Parameters

ParameterRequired/OptionalDescription
queryObject
Required
The query object in which a column is to be deleted.
columnName
Required
The name of the column to be deleted.

Example

<cfscript>
    myQuery = queryNew("id,name,amount","Integer,Varchar,Integer", 
                [ 
                        {id=1,name="One",amount=15}, 
                        {id=2,name="Two",amount=18}, 
                        {id=3,name="Three",amount=32} 
                ]); 
    writeOutput("The original query object:")
    writeDump(myQuery)
    // Delete column amount
    QueryDeleteColumn(myQuery,"amount")
    writeOutput("The query object with column deleted:")
    writeDump(myQuery)
</cfscript>
Output

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