Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to find out that a record is empty or null

575729Mar 9 2008 — edited Mar 9 2008
hi

how can i find out that a record is empty or null.

in other languages when a object or record is not initialized it will be null.
after initialization how can i find out its values are null. so far i tried this

declare
v_r_emp emp%rowtype := null;

BEGIN
if (v_r_emp is null) then
dbms_output.put_line('record is not initialized');
end if;
END;

it seems in plsql we can assign null but cannot compare it with null clause why? if we are able of assign null we must should about to compare it with null too.

also how record can be made empty. how can we find out that a record variable is empty

please help me to understand the concept

thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 6 2008
Added on Mar 9 2008
1 comment
705 views