oracle存储过程小demo
create or replace procedure test1( p in varchar2, blood_type_name out varchar2, blood_type_remark out varchar2 ) as begin begin select "blood_type_name","blood_type_remark" into blood_type_name ,blood_type_remark from "his_blood_type_config" where "id"=p; exception when no_data_found then blood_type_name := null; when too_many_rows then raise_application_error(-20000,'找到多条数据'); end; return; end;
打印返回错误:
dbms_output.put_line('程序运行错误!请使用游标');