34,593
社区成员
发帖
与我相关
我的任务
分享
--sql 布尔型是bit :1即true 0 为false
select case when [字段] >0 then 1 else 0 end as [结果] from [table]
select Sign(字段) from 表名
select case when cast ([字段] as int )>0 then 'true' else 'false' end as [结果] from [table]
if exists(select 1 from ([查询语句]) t where [字段]<0)
return 'True'
else
return 'False'