PL/SQL sum of 2 numbers
program
---------------------------------------------------------------------------------------------
declare
a number:=10;
b number:=20;
c number;
begin
c:=a+b;
dbms_output.put_line('Sum is' ||c);
end;
/
Run in sql developer::----------------
(Click on the photo to zoom in)
if it is showing procedure is created but not showing any output,run the following commands
--------------------------------------------------------------------------
set serveroutput on;
Then again run
-----------------------------------------------------------------------
declare
a number:=10;
b number:=20;
c number;
begin
c:=a+b;
dbms_output.put_line('Sum is' ||c);
end;
/
---------------------------------------------------------------------------------------------
declare
a number:=10;
b number:=20;
c number;
begin
c:=a+b;
dbms_output.put_line('Sum is' ||c);
end;
/
Run in sql developer::----------------
(Click on the photo to zoom in)
if it is showing procedure is created but not showing any output,run the following commands
--------------------------------------------------------------------------
set serveroutput on;
Then again run
-----------------------------------------------------------------------
declare
a number:=10;
b number:=20;
c number;
begin
c:=a+b;
dbms_output.put_line('Sum is' ||c);
end;
/
Comments
Post a Comment