1. to display the content in dbms_output.put_line (v_rolename), run the command in SQL * Plus first.
Set serveroutput on;
Ii. cursor classification:
Using ref cursor, you can pass the result set between programs (one program opens the cursor
Basic Oracle cursor and basic oracle cursor
I. cursorThe cursor is used to process the multi-row records retrieved from the database (using the SELECT statement ). With the cursor, the program can process and traverse the entire record set returned
Declare l_ SQL varchar2 (2000): = 'select deptno, LOC from Scott. dept '; l_where varchar2 (200); type dept_curtype is ref cursor; dept_cur dept_curtype; type dept_rec is record ( deptno varchar2 (200) -- attention the record element order ,
in program development, commonly used to return the result set of stored procedures, which in MySQL and SQL Server better processing, directly return query results can be, but in Oracle inside out, there is one more step, To the unfamiliar
A Oracle's Cursors Concept:Cursors: Used to query a database, get a pointer to a collection of records (the result set), which allows the developer to access a row of result sets at a time and manipulate each result set.
Two Oracle's Cursors
Stored ProceduresIn Oracle, you can define subroutines in the database, which are called stored Procedures (procedure). It is stored in a data dictionary that can be shared between different users and applications, and can be optimized and reused
How to define the cursor typeType ref_type_name is ref cursor [return return_type];Declare cursor variableCursor_name ref_type_name;From the technical bottom layer, the two are the same. Common PLSQL cursor is "static" in definition. While ref
Introduction: Plsql Data typesScalar data types: Numeric class, character class, Date class, Boolean Class (Boolean),Composite data types: Records (%rowtype), tables, arraysReference type: REF CURSORLOB type: BLOB, CLOB1. System-Defined
Table functions can use query statements or cursors as input parameters and output multiple rows of data. This function can be executed in parallel and continuously output data streams, known as pipeline output. The table function can be used to
1. Definition: outputs; 2. Implement the Dynamic cursor stored procedure as the out parameter. For example, use tablename to dynamically obtain outputs (I _TABLE_NAMEINVARCHAR2, outputs) ASBEGINIFUPPER (I _TABLE_NAME) T_BANK_ACCOU
1. definition:
Unlike SQL Server, Oracle uses Select to return the result set in the stored procedure, but returns the result set through Out parameters.
Unlike SQL Server, Oracle uses Select to return the result set in the stored procedure, but returns the result
An overview:1. A pipe function is a function that can return a rowset (which can make a nested table nested table or array varray), and we can query it like a physical table orassigns a value to the collection variable. 2, the pipeline function for
The stored procedure for returning a result set in Oracle, Unlike SQL Server, In the stored procedure, Oracle uses Select to return a result set. Instead, it uses Out-type parameters to return a result set. It is actually using REF CURSOR--
I. Overview: 1. The pipeline function is a function that can return a row set (nested table or array varray can be used). We can query it like a physical table orAssign a value to the set variable.2. Pipeline functions are executed in parallel. If
1. Cursor conceptLiterally, it refers to a swimming cursor, which is a handle or pointer pointing to the context area.When performing the CRUD operation in the PL/SQL block, ORACLE allocates a context zone for it in the memory. The database language
Oracle Database: PL/SQL cursor overview, oracleplI. cursor Concept
Literally, it refers to a swimming cursor, which is a handle or pointer pointing to the context area.
When performing the CRUD operation in the PL/SQL block, ORACLE allocates a
an overview:1. A pipe function is a function that can return a rowset (a table or array varray can be nested), and we can query it like a physical table or
Assignment to a collection variable.
2, pipeline function for parallel execution, in the
An overview:1. A pipe function is a function that returns a rowset (capable of making a nested table nested table or array varray), and we can query it like a physical table orassigns a value to the collection variable. 2, the pipeline function for
Cursors (cursor) During database development, when we encounter a single record from one result set. So how do we solve this problem? cursors provide us with a very good solution. 1. Advantages of cursors and cursors Essentially, a cursor is
Company requirement knowledge self-taught-functions and usage of Oracle Package simplify application design, improve application performance, implement information hiding, and overload subroutines. 1. Does Oracle Package play a role (benefit) in
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.