count.sql

来自「介绍Oracle PL SQL编程」· SQL 代码 · 共 32 行

SQL
32
字号
/* * count.sql * Chapter 6, Oracle10g PL/SQL Programming * by Ron Hardman, Michael McLaughlin and Scott Urman * * This script demonstrates how to use the Oracle10g Collection API * COUNT method against an element. */SET ECHO ONSET SERVEROUTPUT ON SIZE 1000000DECLARE  -- Define a nested table type of INTEGER.  TYPE number_table IS TABLE OF INTEGER;  -- Define a variable of the nested table type.  number_list NUMBER_TABLE := number_table(1,2,3,4,5);BEGIN  -- Print a title.  DBMS_OUTPUT.PUT_LINE('How many elements');  DBMS_OUTPUT.PUT_LINE('-----------------');  -- Print the list.  DBMS_OUTPUT.PUT_LINE('Count ['||number_list.COUNT||']');END;/

⌨️ 快捷键说明

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