create or replace procedure PRO_GETYFBGYZB(jgidInput in varchar2, yfsbInput in varchar2 --输入变量
) as
cursor cursorParam is select a.ypxh as YPXH,a.YPCD,a.ypsl,b.yfgg ,a.lsje
from yf_kcmx a, yf_ypxx b
where a.jgid = b.jgid
and a.yfsb = b.yfsb
and a.ypxh = b.ypxh
and a.jgid = jgidInput
and a.yfsb = yfsbInput;
begin
DBMS_OUTPUT.ENABLE( 1000000);
for temp in cursorParam
Loop
dbms_output.put_line( '药品序号:' || temp.ypxh);
end Loop ;
end PRO_GETYFBGYZB;

本文介绍了一个PL/SQL过程的实现,该过程通过输入参数查询药品基本信息,并使用DBMS_OUTPUT展示查询结果。此示例展示了如何定义游标进行数据检索。
599

被折叠的 条评论
为什么被折叠?



