CREATE TYPE nums_list AS TABLE OF NUMBER;
oracle的嵌套表中最大可能的行数是多少?
更新
CREATE TYPE nums_list AS TABLE OF NUMBER; CREATE OR REPLACE FUNCTION generate_series(from_n NUMBER, to_n NUMBER) RETURN nums_list AS ret_table nums_list := nums_list(); BEGIN FOR i IN from_n..to_n LOOP ret_table.EXTEND; ret_table(i) := i; END LOOP; RETURN ret_table; END; SELECT count(*) FROM TABLE ( generate_series(1,4555555) );
这给出了错误: ORA-22813 operand value exceeds system limits, Object or Collection value was too large
ORA-22813 operand value exceeds system limits, Object or Collection value was too large
的下标为嵌套表的范围为1..2 ** 31这样可以有集合中的2层** 31的元件。自从至少8.1.6起,该限制就没有改变,当然,将来可能会改变。