Friday, February 27, 2009

Ref Cursor

Ref cursor is one of the most powerful ways to return stored procedures query results from oracle database.
The following example shows how to use oracle ref cursor .


CREATE OR REPLACE PROCEDURE SP_EMP (CUR_EMP OUT SYS_REFCURSOR) AS

BEGIN
OPEN CUR_EMP FOR
SELECT EMP_FNAME, EMP_LNAME, EMP_DATA
FROM EMPLOYEE

No comments:

Post a Comment