Use table column type as an variable type : Procedure Function Body « Stored Procedure Function « Oracle PL / SQL






Use table column type as an variable type

  
SQL>
SQL>
SQL>  create table bar ( n number );

Table created.

SQL>
SQL>  create or replace procedure foo as
  2      l_n bar.n%type;
  3    begin
  4      null;
  5    end foo;
  6    /

Procedure created.

SQL>
SQL> EXEC foo();

PL/SQL procedure successfully completed.

SQL>
SQL> drop table bar;

Table dropped.

SQL>

   
  








Related examples in the same category

1.The syntax of calling subprograms with no parameters.