⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tconstruct.sql

📁 Oracle 9i PL/SQL程序设计的随书源码
💻 SQL
字号:
REM tConstruct.sql
REM Chapter 8, Oracle9i PL/SQL Programming by Scott Urman
REM This block illustrates nested table constructors.

DECLARE
  TYPE NumbersTab IS TABLE OF NUMBER;

  -- Create a table with one element.
  v_Tab1 NumbersTab := NumbersTab(-1);

  -- Create a table with five elements.
  v_Primes NumbersTab := NumbersTab(1, 2, 3, 5, 7);

  -- Create a table with no elements.
  v_Tab2 NumbersTab := NumbersTab();
BEGIN
  -- Assign to v_Tab1(1). This will replace the value already
  -- in v_Tab(1), which was initialized to -1.
  v_Tab1(1) := 12345;

  -- Print out the contents of v_Primes.
  FOR v_Count IN 1..5 LOOP
    DBMS_OUTPUT.PUT(v_Primes(v_Count) || ' ');
  END LOOP;
  DBMS_OUTPUT.NEW_LINE;
END;
/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -