首页>计算机>Oracle认证>应用技术>正文
Oracle Pro*C/C++游标和存储过程性能测试报告

www.zige365.com 2007-8-7 18:24:43 点击:发送给好友 和学友门交流一下 收藏到我的会员中心
用于读取记录的存储过程包头

create or replace package testEptTbl as

type charArrayType is table of varchar2(2048)

index by binary_integer;

type lcharArrayType is table of varchar2(2048)

index by binary_integer;

type numArrayType is table of int

index by binary_integer;

num INTEGER;

m_RncID INTEGER;

procedure get_R0BrdLib(

batch_size in integer,

found in out integer,

done_fetch out integer,

BoardType1 out numArrayType,/*单板类型Board Type*/

BoardName1 out charArrayType/*各子单元类型包含的子单元个数Sunit Number Per Type*/);

end testEptTbl;

/

show err

    用于记录的存储过程包体

create or replace package body testEptTbl as

/* 3 */

cursor CUR_R0BrdLib is

SELECT BYBOARDTYPE,ABYBOARDNAME FROM tb_boardt;

procedure get_R0BrdLib(

batch_size in integer,

found in out integer,

done_fetch out integer,

BoardType1 out numArrayType,/*单板类型Board Type*/

BoardName1 out charArrayType/*各子单元类型包含的子单元个数Sunit Number Per Type*/) is

begin

if not CUR_R0BrdLib%isopen then

open CUR_R0BrdLib;

end if;

done_fetch := 0;

found := 0;

for i in 1..batch_size loop

fetch CUR_R0BrdLib

into BoardType1(i),BoardName1(i);

if CUR_R0BrdLib%notfound then

close CUR_R0BrdLib;

done_fetch := 1;

exit;

else

found := found + 1;

end if;

end loop;

end get_R0BrdLib;

end testEptTbl;

/

show err

    1.3.2 游标方式:

本新闻共5页,当前在第3页  1  2  3  4  5  

我要投稿 新闻来源:豆豆技术网 编辑: 作者:
相关新闻