create table #tmpValue (sValue varchar(300) )
insert into #tmpValue execute('s v e g hc [] cccccffffffff ')
if @@error<>0 select 'error'
else select 'ok'
drop table #tmpValue
这样可以执行到if,
可是我在存储过程里写的,if不会执行下去,直接返回一个空值
什么时候@@error那句IF语句会执行下去,什么时候会直接返回啊
insert into #tmpValue execute('s v e g hc [] cccccffffffff ')
if @@error<>0 select 'error'
else select 'ok'
drop table #tmpValue
这样可以执行到if,
可是我在存储过程里写的,if不会执行下去,直接返回一个空值
什么时候@@error那句IF语句会执行下去,什么时候会直接返回啊
============
可是有时候太严重了他就直接退出了,下面的语句(if @@error ...)就执行不到了