Oracle Collection 集合

前端之家收集整理的这篇文章主要介绍了Oracle Collection 集合前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
-- Associative Array Indexed by String
DECLARE

  TYPE ASS_ARR1 IS TABLE OF NUMBER INDEX BY VARCHAR2(64);

  ASS_ARR ASS_ARR1;
  I       VARCHAR2(63);

BEGIN ASS_ARR('a') := 1;
  ASS_ARR('b') := 2;
  ASS_ARR('c') := 3;

  I := ASS_ARR.FIRST;
  WHILE I IS NOT NULL LOOP

    DBMS_OUTPUT.PUT_LINE('values of ' || I || ' is ' || ASS_ARR(I));
    I := ASS_ARR.NEXT(I);
  END LOOP;

END;
原文链接:https://www.f2er.com/oracle/210209.html

猜你在找的Oracle相关文章