Constructor for a Varray
DECLARE
-- In the varray, we put an upper limit on the number of elements
TYPE dnames_var IS VARRAY(20) OF VARCHAR2(30);
dept_names DNAMES_VAR;
BEGIN
-- Because dnames is declared as VARRAY(20), we can put up to 10
-- elements in the constructor
dept_names := Dnames_var('Shipping','Sales','Finance','Payroll');
END;
/
0 comments:
Post a Comment