Add Two Numbers and display result:
Adding two numbers consists on following steps.
i) Identifying the first number
ii) Identifying the second number
iii) Identifying the third number where addition of first and second number is stored. (result)
iv) Add two numbers into result
v) Display result
CODE:
declare
n1 number;
n2 number;
result number;
begin
n1:=10;
n2:=20;
result:=n1+n2;
dbms_output.put_line(result);
end;
Result: 30
No comments:
Post a Comment