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.

Assigning a Null Value to a Nested Table


DECLARE

TYPE dnames_tab IS TABLE OF VARCHAR2(30);

-- This nested table has some values

dept_names DNAMES_TAB := Dnames_tab('Shipping','Sales','Finance','Payroll');

-- This nested table is not initialized ("atomically null").

empty_set DNAMES_TAB;

BEGIN

-- At first, the initialized variable is not null.

IF dept_names IS NOT NULL THEN

dbms_output.Put_line('OK, at first dept_names is not null.');

END IF;



-- Then we assign a null nested table to it.

dept_names := empty_set;



-- Now it is null.

IF dept_names IS NULL THEN

dbms_output.Put_line('OK, now dept_names has become null.');

END IF;



-- We must use another constructor to give it some values.

dept_names := Dnames_tab('Shipping','Sales','Finance','Payroll');

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 :-