paoracle中的包头(Package)与包体(Package body)

时间:2024-01-03 13:33:44

http://www.th7.cn/db/Oracle/201406/56949.shtml

简单的实例

create or replace package body integrationEgoToSse as
procedure insertDataToSseTable is
name varchar2(160);
i_sid varchar2(160);
cursor employeeCur is
select * from student;
cursor innerCur is
select * from student where sid = i_sid;
begin for empCur in employeeCur loop
i_sid := empCur.Sid;
for inCur in innerCur loop
dbms_output.put_line('inCur.sid=' || inCur.sid || ' inCur.sname=' ||
inCur.sname);
end loop;
dbms_output.put_line(' ');
end loop;
end insertDataToSseTable; end integrationEgoToSse;