SQL判断如果一列值为null则取另一列值代替 isnull()

时间:2014-11-24 18:40:02   收藏:0   阅读:510
SELECT TOP 1000 [chClientCode]
      ,[nvcClientName]
      ,[chRegionCode]
      ,isnull(chUltimateHeadClientCode,[chClientCode]) as chUltimateHeadClientCode
  FROM [PwCMDM_V1].[Core].[tblClient]

 

Define:

isnull(expression,replacement_value)

原文:http://www.cnblogs.com/dangkei/p/4119052.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!