Showing posts with label procedure. Show all posts
Showing posts with label procedure. Show all posts

Monday, 23 July 2012

Returning Result set

CREATE OR REPLACE PROCEDURE scott.proc (v_deptno nmuber,p_result_set OUT sys_refcursor)
IS
BEGIN
OPEN p_result_set FOR
SELECT *FROM emp
END;
WHERE deptno LIKE '%' || v_deptno;