A是个Bit字段,B是数字,当A为true与B小于2时,返回1,其余结果返回0,该怎样写这个存储过程呢?假设A与B全在表C中。
用C#就是
if(A==TRUE&&B<2)
return 1
else
retrun 0
这个用存储过程怎么写?作业要用,明天要交,在线等
可以写全吗 从create proc Getresult开始 立刻采纳 O(∩_∩)O谢谢
追答create proc Getresult
as
select (case when c.a=ture and c.b<2 then '1' else '0') from C;
我去验证一下 ==哈
本回答被提问者采纳