with as在存储过程使用

来源:互联网 发布:男士沙滩裤 知乎 编辑:程序博客网 时间:2024/05/17 08:54
create or replace procedure strToken is
   int var_count:=0;
   int var_count1:=0;
begin
   with t as (select code from company where code='1111')
   SELECT (select count(1) from company_extend where code in (select code from t))
         ,(select count(1) from company_bank where code in (select code from t))
     INTO var_count,var_count1
     FROM DUAL;
end;
/
0 0