Oracle 11g2:
- 创建存储过程基本语法
-
CREATE [OR REPLACE] PROCEDURE procedure_name
(parameter1_name [mode] datatype
[DEFAULT|:=value]
[, parameter2_name [mode] datatype
[DEFAULT|:=value],…])
AS|IS
/*Declarative section is here */
BEGIN
/*Executable section is here*/
EXCEPTION
/*Exception section is here*/
END[procedure_name];
-
- 注意:
- 如果没有参数(parameter)则不能带括号,即只有procedure_name
- Declarative section即使为空也要需要加 AS|IS,否则会报错