Oracleprocedure return dataset Summary

Source: Internet
Author: User
To obtain a data set from OracleProcedure, The RefCursor method is usually used. To obtain this Cursor, there are several methods: 1. dynamic SQL return: in this case, Pr

To obtain a data set from Oracle Procedure, the Ref Cursor method is usually used. To obtain this Cursor, there are several methods: 1. dynamic SQL return: in this case, Pr

To obtain a data set from Oracle Procedure, the Ref Cursor method is usually used. To obtain this Cursor, there are several ways:

1. dynamic SQL return:

In this case, Procedure operations are usually relatively simple. For example, you can use a combination of SQL statements or Join operations on multiple tables, but you can use one SQL statement to complete the query.

2. If the Procedure logic operation is complicated, it cannot be completed in one SQL statement. In general, intermediate calculation data needs to be temporarily stored in the operation process.
In this case, you can use the following methods:
1) Use a nested Table to dynamically generate a dataset and use the Table () function to return the dataset. In this way, you need to create an Object in the database and create a nested table,
The Type defined in the local scope cannot be recognized.
Create an Object.

Create a nested table with the Object stockPallet_type created above

  • 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.