Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
CREATE OR REPLACE PACKAGE types_pkg IS
TYPE typdef_ref_cursor IS REF CURSOR;
TYPE typdef_record_num IS RECORD (r_number NUMBER);
END;
/
CREATE OR REPLACE PROCEDURE test_prc
( in_date IN DATE,
out_cursor OUT types_pkg.typdef_ref_cursor )
IS
v_last_day number := to_char(last_day(in_date),'dd');
BEGIN
OPEN out_cursor FOR
SELECT ROWNUM
FROM all_objects
WHERE ROWNUM BETWEEN 1 AND v_last_day;
END test_prc;
/
SET serveroutput ON SIZE 25000
DECLARE
v_cursor types_pkg.typdef_ref_cursor;
v_dom_row types_pkg.typdef_record_num;
v_dom NUMBER;
BEGIN
test_prc(SYSDATE, v_cursor);
LOOP
FETCH v_cursor INTO v_dom_row;
EXIT WHEN v_cursor%NOTFOUND;
dbms_output.put_line(v_dom_row.r_number);
END LOOP;
CLOSE v_cursor;
END;
/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30