1

PROCEDURE sample (p_num1 IN TABLE%TYPE, p_num2 OUT NUMBER) IS

OR

PROCEDURE sample (p_num1 IN TABLE%TYPE, p_num2 OUT NUMBER) AS

Nirav Patel
  • 1,297
  • 1
  • 12
  • 23
  • 2
    There's no difference. Use the one you like most. – Pavel Smirnov Jan 22 '20 at 19:04
  • If you're ever unsure, look up the documentation. For `CREATE PROCEDURE`, you can see that IS and AS are interchangeable. https://docs.oracle.com/cd/B28359_01/appdev.111/b28370/create_procedure.htm#LNPLS01373 – kfinity Jan 22 '20 at 21:21

1 Answers1

5

The difference is only one letter: I vs. A. You can use both, there won't be any other difference. The effect of executing both is the same except for the same minor difference stored in the data dictionary tables [CDB|DBA|ALL|USER]_SOURCE.

SQL> create or replace procedure p_test is begin null; end;
  2  /

Procedure created.

    SQL> create or replace procedure p_test as begin null; end;
      2  /

    Procedure created.

    SQL>

Note that it doesn't work for e.g. views:

SQL> create or replace view v_emp as select * from emp;

View created.

SQL> create or replace view v_emp is select * from emp;
create or replace view v_emp is select * from emp
                             *
ERROR at line 1:
ORA-00905: missing keyword
Jeff Holt
  • 2,940
  • 3
  • 22
  • 29
Littlefoot
  • 131,892
  • 15
  • 35
  • 57