在存储过程中定义了一个变量: v_monthflag
select month_id from table1 where month_id = substr(vi_sdate,1,6)
选出的结果为空
当使用:
select month_id into v_monthflag from table1
where month_id = substr(vi_sdate,1,6) 时程序跑不过去,报错:选不出来值。
然而:
select (select month_id from table1 where month_id = substr(vi_sdate,1,6) )
into v_monthflag from dual;
可以正常通过
这个如何理解!!!如何解释!!!
…………………………………………………………坐等大牛………………………………
select month_id from table1 where month_id = substr(vi_sdate,1,6)
选出的结果为空
当使用:
select month_id into v_monthflag from table1
where month_id = substr(vi_sdate,1,6) 时程序跑不过去,报错:选不出来值。
然而:
select (select month_id from table1 where month_id = substr(vi_sdate,1,6) )
into v_monthflag from dual;
可以正常通过
这个如何理解!!!如何解释!!!
…………………………………………………………坐等大牛………………………………
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货