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>
	myResult=QueryExecute(("SELECT * FROM EMPLOYEES WHERE EMP_ID BETWEEN :low AND :high"),{low=4,high=14},
{datasource="cfdocexamples"});
	writeOutput("Original query object" & "<br/>");
	WriteDump(myResult);
	// delete column
	result=myResult.deleteColumn("IM_ID");
	writeOutput("Deleting column IM_ID" & "<br/>");
	WriteDump(result);
</cfscript>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy