
set serveroutput on size 10000;--定义变量,如下定义变量aa,bb,ccvariable aa number;variable bb number;variable cc varchar2(20);begin 存储过程名 (入参1,...,入参N,:出参1,...,:出参N); dbms_output.enable; --输出激活设置 dbms_output.put_line(:参数N); --输出参数Nend;/如:set serveroutput on size 10000;variable aa number; --定义number变量时不要定义长度variable cc varchar2(20); --定义字符串变量要定义长度begin sp_tmp_getindex ('503','000','test',0,:aa,:cc); dbms_output.enable; dbms_output.put_line(:aa); --使用变量时前面要加:end; /当没有出参或者入参时,使用下面方法是可以的,但是存在出入参时下面的方法就不行了。exec 存储过程名
