create procedure pro_calc @num int as if @num<3 begin print '小于3' print 'sss' end else begin print '大于等于3' print 'fdf' end
这个存储过程,一定要有begin 和end,因为if后面有两条语句要处理,相当于c#里的花括号一样。
create procedure pro_calc @num int as if @num<3 begin print '小于3' print 'sss' end else begin print '大于等于3' print 'fdf' end
这个存储过程,一定要有begin 和end,因为if后面有两条语句要处理,相当于c#里的花括号一样。