PLSQL Local and Global Variable - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
PLSQL Local and Global Variable

PLSQL Local and Global Variable

PLSQL Local and Global Variable

Global Variable:- Global variable is variable that is declared in the outermost block and available for all inner blocks.
Local Variable: -Local variable are variables those are declared in inner block and available for only that inner block

declare
a number;
b number;            --Global variable
sum1 number;
begin
a:=&a;
b:=&b;
sum1:=a+b;
dbms_output.put_line('Sum of given numbers is :'||sum1);
declare
b number;            --Local variable
begin
dbms_output.put_line('Sum of given numbers is :'||b);
end;
dbms_output.put_line('Sum of given numbers is :'||a);
end;
/

About Mariano

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.