oracle数据sql语句如何判断list为空

如题所述

写个自定义过程,代码如下:
SQL> CREATE OR REPLACE PROCEDURE is_list_empty AS
2 TYPE nestedTableType IS TABLE OF VARCHAR2(10);
3 myTable1 nestedTableType;
4 result BOOLEAN;
5 BEGIN
6 myTable1 := nestedTableType('F', 'G', 'S');
7 result := myTable1 IS EMPTY;
8 IF result THEN
9 DBMS_OUTPUT.PUT_LINE('Nested table is empty');
10 ELSE
11 DBMS_OUTPUT.PUT_LINE('Nested table contains elements');
12 END IF;
13 END is_list_empty;
14 /
温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网