sqlserver 三元运算符

sqlserver 三元运算符

三元运算效果

Case when ....... then ....... else ......... end

select row_number() over(  order by UserID desc ) as rn,
(case when Pla_Shop_WxOpenID is null or Pla_Shop_WxOpenID='' then 0 else 1 end ) as IsXiaoChengXu,
UserID,Pla_Shop_WxOpenID, NickName, PicUrl, BID, ParentID
from WxUsers where BID='111' 

 

posted on 2022-10-31 17:41  Jankie1122  阅读(129)  评论(0编辑  收藏  举报