Oracle PL/SQL - Passing parameters to procedures

Introduction

PL/SQL allows you to pass parameters to procedures:

Demo

SQL>
SQL> Create or replace procedure p_helloTo (i_tx varchar2)
  2  is-- from www.j  a v  a  2s .  com
  3      my_val varchar2(256):='Hello, '||i_tx||'!';
  4  begin
  5      dbms_output.put_line(my_val);
  6  end;
  7  /

Procedure created.
SQL>
SQL> begin
  2    p_helloTo('Everybody');
  3  end;
  4  /
Hello, Everybody!

PL/SQL procedure successfully completed.
SQL>

Related Topic