Original: http://ntk2006.blog.sohu.com/135331235.html
Cursor ConceptCursors provide a flexible way to retrieve and operate data from tables. cursors are mainly used on servers to process SQL statements sent from clients to servers, or data
I. cursor Recognition
Cursor allows you to access the result set returned by SQL Server row by row.A major reason for using cursor is to convert the set operation into a single record processing method.After retrieving data from a database using
-In Oracle, when we execute a SELECT statement from Pl/sql, the Oracle RDBMS (relational database management system) assigns a private SQL zone to the SGA shared pool for that statement.
--At the same time, put the query result set into the system
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
Usually we obtain cursor data in the form of fetch some_cursor into var1 and var2. When there are not many records in the cursor, It is not tight. However, since Oracle 8i, Oracle has provided fetch bulk collect to fetch data in the cursor in
CursorA cursor is a data buffer opened by the system for the user, which holds the results of the SQL statement execution. Each cursor area has a name that allows the user to retrieve the record from the cursor one at a-and assign it to the main
The concept of cursors:
A cursor is a memory workspace of SQL that is defined by the system or user as a variable. The role of a cursor is to temporarily store blocks of data that are extracted from the database. In some cases, the data needs to be
Today, we will briefly summarize the usage of cursor in PL/SQL.
Cursor category:
-- Explicit cursor-- Static cursor |
| -- Implicit cursorCursor |-- Strong type (Restriction), specifying the return type-- Dynamic Cursor -- ref cursor |-- Weak type
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
SQL code
-- Ref cursor
/*
Show multiple rows of a cursor
Implicit cursor data manipulation language DML and single-line select into statement
1. Define a cursor
Select result set statement corresponding to the cursor
CURSOR cursor_name IS
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.