This topic is far from new, but I think it deserves another mention. The cfqueryparam tag has an optional attribute, null, that allows you to pass a NULL value to the database. Note, this is a SQL NULL, not the empty string that replaces a NULL value in ColdFusion. The ColdFusion docs state that the attribute accepts either a yes or no value. However, like many other tags in ColdFusion, a boolean works just fine, and has the benefit of creating easier to read code. I find

view plain print about
1<cfqueryparam value="#mystring#" cfsqltype="cf_sql_varchar" maxlength="5" null="#NOT len(mystring)#">
is clearer and easier to read than
view plain print about
1<cfqueryparam value="#mystring#" cfsqltype="cf_sql_varchar" maxlength="5" null="#yesNoFormat(NOT len(mystring))#">