Using ISNULL vs using COALESCE for checking a specific condition?
问题 I know that multiple parameters can be passed to COALESCE , but when you want to to check just one expression to see if it doesn't exist, do you use a default or is it a better practice to use ISNULL instead? Is there any performance gain between the two? 回答1: This problem reported on Microsoft Connect reveals some differences between COALESCE and ISNULL : an early part of our processing rewrites COALESCE( expression1, expression2 ) as CASE WHEN expression1 IS NOT NULL THEN expression1 ELSE