<!--- Create a query that we will sort. --->
<cfset values = queryNew( "" ) />

<!--- Add the ID column. --->
<cfset queryAddColumn(
	values,
	"id",
	"cf_sql_integer",
	listToArray( "1,2,3,4,5" )
	) />


<!--- Loop a few times to shuffle the column. --->
<cfloop
	index="i"
	from="1"
	to="5"
	step="1">


	<!---
		Shuffle the column.

		NOTE: I am using BRACKET notation so as to refer to the
		column as a collection (rather than just the first value
		in the column).
	--->
	<cfset createObject( "java", "java.util.Collections" ).shuffle(
		values[ "id" ]
		) />

	<!--- Output the shuffled query column. --->
	<cfdump
		var="#values#"
		label="Shuffle (#i#)"
		/>

	<br />


</cfloop>