怎么在sqlplus调用输入参数为集合类型的包函数?---(index-by集合)

xiaoxiao2022-06-12  32

怎么在sqlplus调用输入参数为集合类型的包函数?---(index-by集合)

create   or   replace   package   testpkg   is           type   typetest   is   table   of   varchar2(10)   index   by   binary_integer;                 function   insTest1(tTest   in   typetest   )return   number;             end   testpkg;     --主体     create   or   replace   package   body   testpkg   is     function   insTest1(tTest   in   typetest   )return   number     is       begin     insert   into   test   values     (to_number(ttest(1)),ttest(2),ttest(3),to_number(tTest(4)),10);         return   0;         end   insTest1;     end   testpkg;  

怎么在sqlplus调用输入参数为集合类型的包函数?-   ===============

SQL>     declare         2                   type   typetest   is   table   of   varchar2(10)   index   by   binary_integer;         3                   tTest         typetest   ;                             lv               number(5);         4       begin         5               tTest(1)   :='1';         6               tTest(2)   :='1';         7               tTest(3)   :='1';                         lv   :=   testpkg.insTest1(tTest);         8       end;         9     /     =======

declare     v_tTest     testpkg.typetest:=testpkg.typetest(1,2,3,4);     num   number;     begin     num:=testpkg.insTest1(v_tTest);     dbms_output.put_line(num);     end;     /

为什么我这样做就不行,老会说testpkg.typetest不是个函数?????

相关资源:敏捷开发V1.0.pptx
转载请注明原文地址: https://www.6miu.com/read-4933509.html

最新回复(0)