比如:
TYPE typ_rtb_qltyactual01 IS TABLE OF cur_qltyactual01%ROWTYPE INDEX BY BINARY_INTEGER;

解决方案 »

  1.   

    创建一个以【cur_qltyactual01%ROWTYPE】类型的,以数值【BINARY_INTEGER】为
    标号的数组。
      

  2.   

     INDEX BY BINARY_INTEGER简单说就是用数字作为索引表的下标
      

  3.   

    原来这样,下面的代码如果不加“index by binary_integer”,就要用 table1 tabletype1:=tabletype1();
    table.extend;Declare
      type tabletype1 is table of varchar2(9) index by binary_integer;
      table1 tabletype1;
    begin
      table1(1):='成都市';
      table1(2):='北京市';
      table1(3):='青岛市';
      dbms_output.put_line('总记录数:'||to_char(table1.count));
      dbms_output.put_line('第一条记录:'||table1.first);
      dbms_output.put_line('最后条记录:'||table1.last);
      dbms_output.put_line('第二条的前一条记录:'||table1.prior(2));
      dbms_output.put_line('第二条的后一条记录:'||table1.next(2));
    end;
      

  4.   

    8楼说得对,不加的话就要变成:
    declare
    type tabletype1 is table of varchar2(9) index by binary_integer;
      table1 tabletype1=tabletype1();
    begin  
      n.extend;
       table1(1):='成都市';
      n.extend;
       table1(2):='北京市';
    end;
     也就是说,加了index by binary_integer;tabletype1 类型的下标就是自增长的,tabletype1 类型在插入元素时,不需要初始化,不需要每次extend增加一个空间。------------------
    广告:南通吃喜酒婚庆网