Oracle 中的 "procedure name IS' and a "Procedure name AS" 有什么区别?
What is the difference between a "procedure name IS' and a "Procedure name AS" in Oracle?
PROCEDURE sample (p_num1 IN TABLE%TYPE,
p_num2 OUT NUMBER) IS
或
PROCEDURE sample (p_num1 IN TABLE%TYPE,
p_num2 OUT NUMBER) AS
只有一个字母的区别:I
与 A
。您可以同时使用两者,不会有任何 other 差异。除了存储在数据字典表 [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>
请注意,它不适用于例如观看次数:
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
PROCEDURE sample (p_num1 IN TABLE%TYPE, p_num2 OUT NUMBER) IS
或
PROCEDURE sample (p_num1 IN TABLE%TYPE, p_num2 OUT NUMBER) AS
只有一个字母的区别:I
与 A
。您可以同时使用两者,不会有任何 other 差异。除了存储在数据字典表 [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>
请注意,它不适用于例如观看次数:
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