Oracle stored procedure returns result set

Source: Internet
Author: User

Http://www.2cto.com/database/201204/127180.html

Oracle implements the method by which the stored procedure returns a collection of query results-the method that implements the stored procedure to return a collection of query results, from the network grooming http://topic.csdn.net/u/20090721/12/ Ba403739-3212-4016-83ec-2a7062f21081.html
Java code--the first method of Create or replace package sysbasic as www.2cto.com type cc_cursor is REF CURSOR;    End Sysbasic; CREATE OR REPLACE PROCEDURE getall (c_cursor out sysbasic.cc_cursor-cursor result) begin open C_cursor for Selec  T * from table1;   End GetAll; Www.2cto.com--The second method of Create or replace procedure P_test (P_cur out sys_refcursor) as begin open P_cur for Sele  CT * from EMP;      End P_test;   In the Sqlplus interface: sql> var r refcursor;   Sql> exec p_test (: R);   sql> print R; Call using PL/SQL See the following link: http://blog.csdn.net/kimizhou_blog/article/details/39340851

Oracle stored procedure returns result set

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.