pl/sql 记录表--对象数组

来源:互联网 发布:抢票用什么软件好 编辑:程序博客网 时间:2024/05/16 04:20

-- Created on 2011-7-20 by ZXX

declare -- Local variables here

i integer;

type flag_type is TABLE OF int INDEX BY BINARY_INTEGER;

type list_type is table of t_heart_progress%ROWTYPE index by binary_integer;

list list_type;

list_flag flag_type;

v_area varchar2(10);

SQL_IN varchar2(5000);

Nv_counts number;

Nv_max number;

Nv_min number;

begin -- Test statements here

list(570).areacode :='570';

list(570).allcounts :=100;

list(570).allcounts :=100;

list(570).sendcounts :=100;

list(570).allchunnel :=100;

list(570).usedchunnel :=100;

list(570).speed :=100;

list(570).progressrate :=100;

list(570).stime :=sysdate;

list(570).etime :=sysdate;

list(570).usedtime :=100;

list(570).counter :=100;

list_flag(570) :=1;

 v_area :=list(570).areacode;

SQL_IN := 'select count(*),max(lsspeed), min(chnspeed) from t_area_alloc';

execute immediate SQL_IN into Nv_counts,nv_max,nv_min; --记录数

end;