DECLARE
  TYPE TimeRec IS RECORD (minutes INTEGER, hours INTEGER);
   test1 TimeRec;
  begin
        test1.minutes := 10;
        test1.hours :=20;
  end

解决方案 »

  1.   

    是不是一定要使用RECORD ( 即TYPE TimeRec IS RECORD)??其中RECORD是什么意思? :(
      

  2.   

    TYPE TABLEMAPPINGINFO IS RECORD(A INTEGER);
    我按照一般思路,写了如下代码,但编译不通过!create or replace function 
    GetTableMappingInfo(orderTypeID IN VARCHAR2) 
    return TABLEMAPPINGINFO 
    IS
      Result TABLEMAPPINGINFO;
    begin
      
      return(Result);
    end GetTableMappingInfo;
      

  3.   


    TYPE type_name IS RECORD(
         variable_name datatype[,
         variable_name datatype[,
         variable_name datatype]....]
    );for example
    SQL> declare
      2      TYPE tp IS RECORD(
      3          a     INTEGER,
      4          b     VARCHAR2(40));
      5      tpa   tp;
      6      tpb   tp;
      7      TYPE array IS RECORD(
      8           tp1    tp,
      9           tp2    tp);
     10      array1   array;
     11  BEGIN
     12       tpa.a := 1;
     13       tpa.b := 'type';
     14       array1.tp2.a := 2;
     15       array1.tp2.b := 'type in array';
     16  END;
     17  /