Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Posts
    18

    Smile Unanswered: execute out patrameters

    Hi all,
    How to execute procedures using out parameters in oracle.

    Thanks&Regards
    raavi

  2. #2
    Join Date
    Oct 2004
    Location
    Oklahoma City OK -
    Posts
    122
    The presence of an OUT parameter does not change the way a procedure is executed

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Just make sure you use a variable which will hold the value of the OUT parameter.
    Code:
    SQL> CREATE OR REPLACE PROCEDURE prc_test (par_in IN NUMBER, par_out OUT NUMBER)
    
      2  IS
      3  BEGIN
      4    par_out := -par_in;
      5  END;
      6  /
    
    Procedure created.
    
    SQL> var l_out number;
    SQL>
    SQL> exec prc_test(100, :l_out);
    
    PL/SQL procedure successfully completed.
    
    SQL> print l_out;
    
         L_OUT
    ----------
          -100
    
    SQL>

  4. #4
    Join Date
    Aug 2006
    Posts
    18
    Thank you very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •