Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Oracle PLSQL: Global Name Space :OUTER

Oracle PLSQL: Global Name Space :OUTER

Following example  showing a difference between inner block and outer block variable scope.

You can use OUTER keyword to access outer block variable inside the inner block.
It's called global qualified name space.
Example Code:
DECLARE
num number := 10;
BEGIN
DECLARE
num number := 10;
BEGIN
IF num = OUTER.num THEN
     DBMS_OUTPUT.PUT_LINE('Both are same value');
   ELSE
     DBMS_OUTPUT.PUT_LINE('Different value');
   END IF;
END;  -- End of scope to access num variable
END;
/



This post first appeared on EBiz Integration Technics, please read the originial post: here

Share the post

Oracle PLSQL: Global Name Space :OUTER

×

Subscribe to Ebiz Integration Technics

Get updates delivered right to your inbox!

Thank you for your subscription

×