How do I handle null values from ColdFusion queries?

krishna picture krishna · Oct 29, 2009 · Viewed 12.6k times · Source

If one of the columns in the returned coldfusion query result set has a NULL, how do we check if the value of this column being NULL?

Should we just say <cfif queryname.columnname[i] EQ ''> OR <cfif queryname.columnname[i] eq 'NULL'> ?

Answer

Henry picture Henry · Oct 29, 2009

Null value will only be returned as empty string in a query object.