oracle存储过程——执行
在sql窗口下:
begin
p_aa('0');
end;
在命令窗口下
SQL> set serveroutput on;
SQL> exec p_aa('0');
PL/SQL procedure successfully completed
SQL> exec p_aa('0');
一般诊疗费
120车急救治疗费
PL/SQL procedure successfully completed
SQL>
存储过程
create or replace procedure p_aa(hisid1 in varchar2) is
cursor c1 is select * from rh_zyyy_mx where hisid=hisid1;--定义游标
prec rh_zyyy_mx%rowtype;--定义记录型的变量
begin
open c1;
loop
fetch c1 into prec;
exit when c1%notfound;
dbms_output.put_line(prec.item_name_hosp||'');
end loop;
close c1;
end p_aa;
2023-4-1
更新时间:2024-08-21
本站资料均由网友自行发布提供,仅用于学习交流。如有版权问题,请与我联系,QQ:4156828
© CopyRight 2020-2024 All Rights Reserved. Powered By 71396.com 闽ICP备11008920号-4
闽公网安备35020302034903号