T-SQL XOR Operator

后端 未结 9 669
既然无缘
既然无缘 2020-11-30 23:43

Is there an XOR operator or equivalent function in SQL Server (T-SQL)?

9条回答
  •  孤街浪徒
    2020-12-01 00:41

    From your comment:

    Example: WHERE (Note is null) ^ (ID is null)

    you could probably try:

    where
       (case when Note is null then 1 else 0 end)
     <>(case when ID is null then 1 else 0 end)
    

提交回复
热议问题