集合没有初始化异常的调查。
-- Created on 2010/11/02 by WANGNAN
declare
-- Local variables here
i integer;
TYPE t_table IS TABLE OF VARCHAR2(250 );
v_table t_table := t_table(); --必须得初始化,不初始化无法使用集合
begin
-- Test statements here
v_table.extend;
v_table(1):= 'xx';
IF v_table IS NOT NULL THEN
FOR i IN 1 .. v_table.count LOOP
dbms_output.put_line(v_table(i));
END LOOP ;
END IF;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line( Sqlerrm);
end;
如上,集合必须初始化。
Oracle 集合没有初始化异常的调查。
最新推荐文章于 2022-09-25 20:48:11 发布