PL-SQL Procedure
Advertisements
PL-SQL Procedure
A pl-sql Procedure does not return any value. Procedure in pl-sql have two sections;
- Declaration of the procedure: Declaration of procedure always start with a keyword create ends with last variable parameters.
- Body of the procedure: Body of procedure starts with a keyword called is or as and ends with end statement.
Syntax
create or replace procedure proc_name [list of parameters] is Declaration section begin Execution section Exception Exception section end;
Example of procedure
create or replace procedure p1(a in number, b out number, c out number, d out number) is begin; select ename, sal, deptno, into b, c, d from emp where empno=a; end;
Google Advertisment