COALESCE or CASE more efficient and/or standard

前端 未结 2 1877
暖寄归人
暖寄归人 2021-01-19 13:31

In terms of x compared to y.

  • Does x comply with sql standards better? [apologies if subjective]
  • Is x more efficient than y?
  • Or are these
2条回答
  •  感情败类
    2021-01-19 14:01

    In this case I would use COALESCE ( which provides more levels than ISNULL) rather than the CASE stement.

    The CASE statement seems a bit bulky here, seeing as you are only checking for NULLs anyway.

提交回复
热议问题