SQL Server CASE????й???Null?????
???????????? ???????[ 2016/5/17 11:10:09 ] ????????????? SQL
??????:
??????????????????????“field”?????“field”???1??NULL????1??????????0???????д????????д????????
????(CASE field
????WHEN '1' THEN '1'
????WHEN NULL THEN '1'
????ELSE '0' END
????) AS field
??????????:
??????????when null???ж??????NULL??????ж????????
????????????ε???NULL????????????????
????(CASE isnull(field??'')
????WHEN '1' THEN '1'
????WHEN '' THEN '1'
????ELSE '0' END
????) AS field
??????????when???д????
????case when field = '1' then '1' when field is null then '1' else '0' end as field
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11