DISQUS

Eddie Awad’s Blog: Adding IN parameter

  • Robert Vollman · 4 years ago
    Don't need to move it to the end. You can specify your arguments in your procedure calls. That is a good habit to get into anyway.

    scott@Robert> create or replace procedure test_proc
    2 (param1\_in in number, param2\_in in number := 1, param2\_out out varchar2)
    3 as
    4 begin
    5 param2\_out := 'done';
    6 end;
    7 /

    scott@Robert> declare
    2 value\_out varchar2(20);
    3 begin
    4 test\_proc (param1\_in => 1, param2\_out => value\_out);
    5 dbms\_output.put_line(value\_out);
    6 end;
    7 /
    done

    "Normally, I do not create procedures. I always use packages."

    What do you mean by that? You create packages with stored procedures inside them?
  • Eddie Awad · 4 years ago
    _Don’t need to move it to the end. You can specify your arguments in your procedure calls_

    What if you cannot or do not want to change how you call the procedure. At work, I have one procedure that is called by 20 others. I do not have access to the other 20 calling procedures and they do not use named notation in their calls. Now I want to add a new IN parameter to the called procedure. What shall I do? That's what I'm trying to solve here.

    _What do you mean by that?_

    Sorry, I was not clear. I meant I always avoid standalone procedures and functions. I always create my procedures and functions inside packages. [Here](http://www.oracle.com/technology/oramag/oracle/05-may/o35plsql.html) is a good article by Steven Feuerstein about this subject.
  • Rob Baillie · 4 years ago
    Sorry Eddie,

    The permalink address for that entry has changed (so much for the perma part of that name!).

    It's now: http://robertbaillie.blogspot.com/2005/08/named...
  • Eddie Awad · 4 years ago
    Rob, the link should be fixed now.
  • Robert Vollman · 4 years ago
    Great Feuerstein link, thanks!