facticatech (1/12/2011)
Is there a better way to write in a single statement instead of 10 statements like the one above for 10 different columns?
"Better" is always subjective , and it does depend.
In your case, you could have a 10million row table where 3 rows match the condition "Where ColumnX is null", if you had a usable index on those columns then your original multi statement method would be "better".
However , i would imagine that here it is not the case here and a single scan would be preferable, though i would use ISNULL the effect is the same .
Just a little food for thought 🙂