DECLARE
TYPE dnames_var IS VARRAY(7) OF VARCHAR2(30);
dept_names DNAMES_VAR := Dnames_var('Shipping','Sales','Finance','Payroll');
BEGIN
dbms_output.Put_line('dept_names has '
||dept_names.COUNT
||' elements now');
dbms_output.Put_line('dept_names''s type can hold a maximum of '
||dept_names.LIMIT
||' elements');
dbms_output.Put_line('The maximum number you can use with '
||'dept_names.EXTEND() is '
||(dept_names.LIMIT - dept_names.COUNT));
END;
/

Checking the Maximum Size of a Collection With LIMIT
0 comments:
Post a Comment