第1个回答 2017-07-27
create or replace procedure proc_test( strAge in string, strName in string, ret_code out string, v_error_message out string) is
begin
declare
strsql varcchar(1024);
v_error_desc varcchar(1024);
begin
v_error_desc :='student';
strsql :='select name from student where age=100';
execute immediate strsql using strAge ;
v_error_desc :='teacher';
strsql :='select age from teacher where name=jill';
execute immediate strsql using strName ;
ret_code:=0;
v_error_desc :='OK';
v_error_message:='OK';
EXCEPTION
WHEN OTHERS THEN
ret_code := sqlcode;
v_error_desc := '错误位置:' || v_error_desc;
v_error_message := sqlerrm;
rollback;
end;
end proc_cancel_digital_id;本回答被提问者采纳