ADDDATE(ereStart, (SELECT hwyl FROM Stock) * NULLIF(Houmuch, (SELECT SharePrice FROM
Stock)) / (SELECT regularPayment FROM Stock)) AS goodThrough
Buried in the middle of the foregoing expression is a NULLIF, because of which the whole
thing is NULL if "houmuch" and "SharePrice" are equal. Thus to write it is quite
convenient--but if the optimizer is not clever enough, there will be wasted effort in
propagating the NULL.
Is the optimizer so clever as to set that test outside the expression, and only then
evaluate it when "houmuch" and "SharePrice" are not equal?