views:

1229

answers:

3

Little help needed here. I'm new to Oracle and i'm not understaning the the syntax of calling a store procedure that has a single in-out parameter. Any example please?

A: 

From the tag I assume you are asking to invoke a oracle SP from SQL plus...

Say you have an SP with name test_me then from sql plus

SQL> execute test_me (parameters_value)

S M Kamran
This will fail with "PLS-00363: expression 'parameters_value' cannot be used as an assignment target "
jva
+1  A: 

You can use an anonymous PL/SQL block to do this:

BEGIN
  do_something();
END;
cletus
+4  A: 
-- procedure
CREATE OR REPLACE PROCEDURE test_proc (param IN OUT NUMBER)
IS
BEGIN
   NULL;
END;


-- call procedure
DECLARE
   var   NUMBER;
BEGIN
   test_proc (var);
END;
jva