Friday, 16 May 2014

plsql inner block 2

DECLARE
-- Global variables
num1 number := 95;
num2 number := 85;
num3 number;
BEGIN
dbms_output.put_line('Outer Variable num1: ' || num1);
dbms_output.put_line('Outer Variable num2: ' || num2);
dbms_output.put_line('Inner Variable num1: ' || num3);
   DECLARE
  -- Local variables
   num3 number := 195;
   num4 number := 185;
   BEGIN
     dbms_output.put_line('Inner Variable num1: ' || num3);
     dbms_output.put_line('Inner Variable num2: ' || num4);
     dbms_output.put_line('Outer Variable num1: ' || num1);
    END;
END;

No comments:

Post a Comment

Note: only a member of this blog may post a comment.