create_assocarray3.sql
来自「介绍Oracle PL SQL编程」· SQL 代码 · 共 38 行
SQL
38 行
/* * create_assocarray3.sql * Chapter 6, Oracle10g PL/SQL Programming * by Ron Hardman, Michael McLaughlin and Scott Urman * * This script demonstrates you can avoid traversing an associative array * where no elements are initialized. */SET ECHO ONSET SERVEROUTPUT ON SIZE 1000000DECLARE -- Define an associative array of strings. TYPE card_table IS TABLE OF VARCHAR2(5 CHAR) INDEX BY BINARY_INTEGER; -- Define an associative array variable. cards CARD_TABLE;BEGIN IF cards.COUNT <> 0 THEN -- Print an element of the cards associative array. DBMS_OUTPUT.PUT_LINE(cards(1)); ELSE -- Print an element of the cards associative array. DBMS_OUTPUT.PUT_LINE('The cards collection is empty.'); END IF;END;/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?