Procedures in PL/SQL

You are currently browsing the articles from Techno Oracle matching the category Procedures in PL/SQL.

Stored Procedures-Advanced Concepts

Use your normal text editor to write the procedure. At the beginning of the procedure, place the command CREATE PROCEDURE procedure_name AS   … For example, to use the example , you can create a text (source) file called get_emp.sql containing the following code: CREATE PROCEDURE procedure_name AS … For example, to use the example , [...]

Written by admin on June 28th, 2010 with no comments.
Read more articles on Procedures in PL/SQL.

Stored Procedure Parameters

Stored procedures and functions can take parameters. The following example shows a stored procedure that is similar to the anonymous block : PROCEDURE get_emp_names (dept_num IN NUMBER) IS emp_name VARCHAR2(10); CURSOR c1 (depno NUMBER) IS SELECT ename FROM emp WHERE deptno = depno; BEGIN OPEN c1(dept_num); LOOP FETCH c1 INTO emp_name; EXIT WHEN c1%NOTFOUND; DBMS_OUTPUT.PUT_LINE(emp_name); [...]

Written by admin on June 27th, 2010 with no comments.
Read more articles on Procedures in PL/SQL.

Stored Procedures in Oracle PL/SQL

A procedure is a subprogram that performs a specific action . A stored procedure is a PL/SQL block that is stored in the database with a name. It is invoked using the name. Each procedure is meant for a specific purpose. A stored procedure is stored in the database as an object. It is also [...]

Written by admin on June 27th, 2010 with no comments.
Read more articles on Procedures in PL/SQL.