i have coded following program for taking losal and hi sal from table salgrade and now using procedure add2 that is following:-
create or replace procedure add2(a in number,b in number,c out number) is
begin
c:=a+b;
end;
procedure is created successfully but want to display total salary=losal+hi sal
using this procedure named as add2 for this i have coded following program and i got error msg that
"invalid sql statement"
hav i written my sql statement is not correct plz solve this problem
decalre
lo salgrade.losal% type;
hi salgrade.hisal% type;
t number;
begin
select losal,hisal into lo,hi from salgrade where grade=2;
add2(lo,hi,t);
dbms_output.put _line('total salary is:'||t);
end;
create or replace procedure add2(a in number,b in number,c out number) is
begin
c:=a+b;
end;
procedure is created successfully but want to display total salary=losal+hi sal
using this procedure named as add2 for this i have coded following program and i got error msg that
"invalid sql statement"
hav i written my sql statement is not correct plz solve this problem
decalre
lo salgrade.losal% type;
hi salgrade.hisal% type;
t number;
begin
select losal,hisal into lo,hi from salgrade where grade=2;
add2(lo,hi,t);
dbms_output.put _line('total salary is:'||t);
end;
Comment