Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to call a procedure with IN and OUT Parameters

728374Mar 21 2011 — edited Mar 21 2011
Hi,
I know this is a very basic question but i m getting some problem with it.
I have a procedure in other users Schema say, scott.storedProc(v_empID IN number, v_empName OUT varchar2).
this procedure has 2 parameters, one is IN and other is OUT.

i need to call it through a anonymous block and see what is being set in the OUT parameter.
this is what i ve done.

declare
v_empId number := 1234;
v_empName varchar2(32);
begin
execute immediate scott.getName(v_empId, v_empName);
dbms_output.put_line('The name is ' || v_empName);
end;


I m not sure if this is the correct way to call a PL/SQL Procedure through an anonymous block.
your Help will be sincerely appreciated
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 18 2011
Added on Mar 21 2011
10 comments
13,021 views