Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> stored proc for update
The following simple update stored proc seems not to be having the desired effect. If I just execute the body of commands in the procedure as an anonymous block, it works. But the same block executed as a stored proc doesn't. Is one of the DMBMS packages reqd for this? I do have DBMS_STANDARD and DBMS_OUTPUT.
select work_tel from tblEmployees where empid=1; // value of work_tel
before invoking stored proc
(Output from PL/SQL:)
WORK_TEL
create or replace procedure spUpdate(id in number, phone in varchar2) as
begin
update tblEmployees
set work_tel=phone
where empid=id;
commit;
end;
/
(Output from PL/SQL:) Procedure created
execute spUpdate(1,'5551212');
(Output from PL/SQL:) procedure successfully completed.
select work_tel from tblEmployees where empid=1; // value of work_tel
after invoking stored proc
(Output from PL/SQL:)
WORK_TEL
the value is unchanged
Pls post, or replies to rsood_at_panix.com Received on Mon Mar 30 1998 - 00:00:00 CST