Live ORACLE

if you are Oracle Developer ,than this Blog most likely will make you happy.

About my Blog

This Blog particularized for Oracle Developers ... you will see interesting Codes for SQL , PL/SQL as well as new ideas for Developer Suite and Client Tools that will help you in your professional life ... and I hope I reach for your satisfaction.

About Me

I'm Hany Freedom , 25 years old , I live in EL-Minia City in Egypt , I'm Moderator at ArabOUG.org the best Arabic Forum for ORACLE on the Net. if you interested to know more about me .... just Click Here.

Multilevel VARRAY

DECLARE
TYPE t1 IS VARRAY (10) OF INTEGER;

TYPE nt1 IS VARRAY (10) OF t1; -- multilevel varray type

va t1 := t1 (2, 3, 5);
-- initialize multilevel varray
nva nt1 := nt1 (va, t1 (55, 6, 73), t1 (2, 4), va);
i INTEGER;
va1 t1;
BEGIN
-- multilevel access
i := nva (2) (3); -- i will get value 73
DBMS_OUTPUT.put_line ('I = ' || i);
-- add a new varray element to nva
nva.EXTEND;
-- replace inner varray elements
nva (5) := t1 (56, 32);
nva (4) := t1 (45, 43, 67, 43345);
-- replace an inner integer element
nva (4) (4) := 1; -- replaces 43345 with 1
-- add a new element to the 4th varray element
-- and store integer 89 into it.
nva (4).EXTEND;
nva (4) (5) := 89;
END;
/

Share/Save/Bookmark

0 comments:

Post a Comment



Newer Posts Older Posts Home Page
 
http://www.dpriver.com/images/sqlpp-banner-2.png

Thanks for reading my Blog ... you Visitor Number :-