Skip to content

Commit 4582aa4

Browse files
committed
Update for REF CURSOR demo
1 parent ab1facd commit 4582aa4

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

examples/demo.sql

+14-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
SET ECHO ON
3030

31+
-- For plsql.js example for bind parameters
3132
CREATE OR REPLACE PROCEDURE testproc (p_in IN VARCHAR2, p_inout IN OUT VARCHAR2, p_out OUT NUMBER)
3233
AS
3334
BEGIN
@@ -37,7 +38,19 @@ END;
3738
/
3839
SHOW ERRORS
3940

40-
-- JSON with Oracle Database 12.1.0.2
41+
-- For refcursor.js example of REF CURSORS
42+
CREATE OR REPLACE PROCEDURE get_emp_rs (p_sal IN NUMBER, p_recordset OUT SYS_REFCURSOR)
43+
AS
44+
BEGIN
45+
OPEN p_recordset FOR
46+
SELECT first_name, salary, hire_date
47+
FROM employees
48+
WHERE salary > p_sal;
49+
END;
50+
/
51+
SHOW ERRORS
52+
53+
-- For selectjson.js example of JSON with Oracle Database 12.1.0.2
4154
DROP TABLE j_purchaseorder;
4255
CREATE TABLE j_purchaseorder
4356
(po_document VARCHAR2(4000) CONSTRAINT ensure_json CHECK (po_document IS JSON));

0 commit comments

Comments
 (0)