Wrong way to reference parameters : Procedure Parameters « Stored Procedure Function « Oracle PL / SQL






Wrong way to reference parameters

    
SQL>
SQL>
SQL>  create table t(
  2      n number,
  3      parm varchar2(20)
  4    )
  5    /

Table created.

SQL>
SQL>  create or replace
  2    procedure insert_into_t(
  3      p_parm1 in number,
  4      p_parm2 in number ) is
  5    begin
  6      insert into t values ( p_parm1, 'p_parm1' );
  7      insert into t values ( p_parm2, 'p_parm2' );
  8    end insert_into_t;
  9    /

Procedure created.

SQL>
SQL> begin
  2     insert_into_t(1,2);
  3  end;
  4  /

PL/SQL procedure successfully completed.

SQL>
SQL> select * from t;

         N PARM
---------- --------------------
         1 p_parm1
         2 p_parm2

SQL>
SQL> drop table t;

Table dropped.

   
    
    
  








Related examples in the same category

1.Number type parameter
2.create and pass in three parms
3.Store procedure with three parameters
4.create default values
5.positional and named notation for procedure calls.
6.Passing parameter by parameter name
7.Procedure with four parameters
8.First 2 parameters passed by position, the second 2 are passed by name
9.Pass null to procedure
10.Procedure with colunm type as parameter type
11.NOCOPY modifier.
12.Legal and illegal formal parameters which are constrained by length.
13.ParameterLength using %TYPE for the parameters(Calling ParameterLength illegally (ORA-6502))
14.Use SYS_REFCURSOR as parameter type
15.Different ways of calling a procedure with default parameters.
16.Default Parameter Values
17.Positional vs. named parameter passing.
18.Use column type to control parameter type
19.Use concatenation to wrap string passed in
20.User-defined collection type parameter