SQL语法:a b c d 如何实现a=0的时候,a,b都显示为空,c=0的时候c,d都显示为空,谢谢!

2025-04-28 11:47:55
推荐回答(1个)
回答1:

select case when a=0 then null else a end as a,case when a=0 then null else b end as b, case when c=0 then null else c end as c,case when c=0 then null else d end as d from table