Oracle Stored Procedure return record set oracle Stored Procedure return record set, the key is to use a cursor. We certainly have a lot of contact with database cursor. We can use OPEN, FETCH, and CLOSE operations to control the cursor for various convenient operations. I will not repeat this example. We will introduce cursor variable ). Similar to a cursor, the cursor variable also points to the current row of a query result set. The difference is that the cursor variable can be opened for any type-similar query instead of bound to a specific query. With cursor variables, you can obtain more convenience in database data extraction. First, create a table. Create table lihuan. BILL_POINTS (www.2cto.com POINTS_ID NUMBER (10, 0) not null, CUSTOMER_ID NUMBER (10, 0) not null, BILL_POINT_NO NUMBER (2, 0) DEFAULT 1 not null, CONSTRAINT PK_BILL_POINTS primary key (POINTS_ID)/second, create a PACKAGE. Create or replace package lihuan. YY_PKG_BILL_POINT_NO/* Get all the user's billing electric numbers */is type T_CURSOR is ref cursor; PROCEDURE BILL_POINT_NO (P_CUSTOMER_ID BILL_POINTS.CUSTOMER_ID % TYPE, Re_CURSOR OUT T_CURSOR); END;/again, create a package body. Create or replace package body lihuan. YY_PKG_BILL_POINT_NO/* Get all the user's billing electric numbers */www.2cto.com is procedure BILL_POINT_NO (P_CUSTOMER_ID BILL_POINTS.CUSTOMER_ID % TYPE, Re_CURSOR OUT T_CURSOR) IS V_CURSOR T_CURSOR; begin open V_CURSOR FOR select Bill_Point_No from BILL_POINTS where CUSTOMER_ID = P_CUSTOMER_ID; Re_CURSOR: = V_CURSOR; END;/Prepared by szsteenzhou