begin select t.value+t.value1 into total from table t exception when others then total := 0; end;total作为变量可以继续使用
with t1 as (select 1+2 var1 from dual), t2 as (select var1 from t1)select var1 from t2;-------------或者-------------------- with t1 as (select 1+2 var1 from dual), t2 as (select (select var1 from t1) v1 from dual)select v1 from t2;
select s.v m from (select t.yw_ly_id+t.yw_ly_id v from s_business_domain t) s 嵌套试试
select t.value+t.value1
into total
from table t
exception
when others then
total := 0;
end;total作为变量可以继续使用
t2 as (select var1 from t1)select var1 from t2;-------------或者--------------------
with t1 as (select 1+2 var1 from dual),
t2 as (select (select var1 from t1) v1 from dual)select v1 from t2;
嵌套试试