QueryDeleteColumn

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

Parameter

Required/Optional

Description

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

Adobe 標誌

登入您的帳戶