数组支持RECORD类型
vastbase=# declare
TYPE sum_type IS RECORD
vastbase-# TYPE sum_type IS RECORD
vastbase-# (
vastbase(# sum_id varchar2(20),
vastbase(# sum_sum number
vastbase(# );
vastbase-# TYPE sum_type1 IS RECORD
vastbase-# (
vastbase(# sum_id1 int,
vastbase(# sum_sum1 number,
vastbase(# sum_sum2 date
vastbase(# );
vastbase-#
vastbase-# sum_rec sum_type;
vastbase-# TYPE sum_type_array IS VARRAY(2) of sum_type;
vastbase-# sum_rec_array sum_type_array;
vastbase-# sum_rec1 sum_type1;
vastbase-# TYPE sum_type_array1 IS VARRAY(2) of sum_type1;
vastbase-# sum_rec_array1 sum_type_array1;
vastbase-#
vastbase-# begin
vastbase$# sum_rec.sum_id :='GLG001_CBB_DAY';
vastbase$# sum_rec.sum_sum := 1;
vastbase$# sum_rec_array[1] := sum_rec;
vastbase$# sum_rec.sum_id :='GLG001_CBC_SUM';
vastbase$# sum_rec.sum_sum := 2;
vastbase$# sum_rec_array[2] := sum_rec;
vastbase$#
vastbase$# sum_rec := sum_rec_array[1];
vastbase$# raise notice 'sum_rec_array[1]:% %', sum_rec.sum_id, sum_rec.sum_sum;
vastbase$# sum_rec := sum_rec_array[2];
vastbase$# raise notice 'sum_rec_array[2]:% %', sum_rec.sum_id, sum_rec.sum_sum;
vastbase$#
vastbase$# sum_rec1.sum_id1 := 3;
vastbase$# sum_rec1.sum_sum1 := 3;
vastbase$# sum_rec1.sum_sum2 := '2020-10-10';
vastbase$# sum_rec_array1[1] := sum_rec1;
vastbase$#
vastbase$# sum_rec1 := sum_rec_array1[1];
vastbase$# raise notice 'sum_rec_array1[1]:% % %', sum_rec1.sum_id1, sum_rec1.sum_su m1, sum_rec1.sum_sum2;
vastbase$# end;
vastbase$# /
NOTICE: sum_rec_array[1]:GLG001_CBB_DAY 1
NOTICE: sum_rec_array[2]:GLG001_CBC_SUM 2
NOTICE: sum_rec_array1[1]:3 3 2020-10-10 00:00:00
ANONYMOUS BLOCK EXECUTE