1. Cursor Concept:When DML (redaction) is performed in a PL/SQL block, Oracle assigns it a context area, which is a pointer to the context area2. Cursor Classification:A. An implicit cursorA. Automatic creation of an implicit cursor when using DML
ADO. NET provides a unified programming mode and a set of public classes for any type of data access, regardless of the language in which you develop code. ADO. net is brand new, but it is as consistent as possible with ADO, it enables the
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
Stored Procedure of the returned result set in Oracle
OracleUnlike SQL Server, you can use select to return data in the stored procedure.ResultThe result set is returned through the out parameter. It is actually using ref cursor
-- Procedure:
--
SQL Server Stored Procedures return result sets very simpleWhy is it so hard for Oracle stored procedures to return result sets?
Process return record set:Create or replace package pkg_testAsType myrctype is ref cursor;Procedure get (p_id number,
1. Today, in Csdn, a question was observed:
CREATE OR REPLACE PACKAGE pkg_aaAsTYPE Myrctype is REF CURSOR;PROCEDURE Get (p_id number, p_rc out myrctype);End Pkg_dept;
How do I call this stored procedure in Sql*plus? The main thing is not knowing to
I. Classification of Cursors
The Oracle database provides two types of cursors, static and dynamic, while static cursors are divided into hermit cursors and explicit cursors, and dynamic cursors are classified as weak and strongly typed. Second,
This article mainly teaches you how to correctly use the Oracle stored procedure so that it can return the actual operation steps of the relevant dataset, we all know that the returned data sets in the stored procedures in Oracle mainly serve to be
Oracle stored procedures support result sets,There is no research yet. For large data volume queries, this method is used to directly return oracledatareader,Is it faster than using other methods (such as views.
The following describes how to use
Oracle dynamic SQL can be written in two ways: dbms_ SQL or execute immediate. The latter is recommended. The test procedure is as follows:
1. DDL and DML/*** DDL ***/BeginExecute immediate 'drop table temp_1 ';Execute immediate 'create table temp_
General methods for debugging stored procedures and functions in PL/SQL Development
General methods for debugging stored procedures and functions in PL/SQL DevelopmentThe powerful features provided by Oracle in PLSQL allow database developers to
Concept 1A cursor is a memory Workspace of SQL, which is defined by the system or user as a variable. The cursor is used to temporarily store data blocks extracted from the database. In some cases, you need to transfer the data from the table stored
PLSQL composite variables and reference Variables
PLSQL compound variable
A composite variable is a variable used to store multiple values. When you define a composite variable, you must use the PL/SQL Composite data type. PL/SQL includesPL/SQL
Oracle databases have the following data types: sclare, composite, and reference ).1. scalar (char, number, varchar2, long, clob, blob, nclob, bfile, date)
Char (Num) is a fixed length of up to 2000 characters. The query efficiency of char is
About cursor Variables
(Cursor variables)How can I insert the ref cursor type result set returned by a stored procedure into a database table? Cursor variable is a PL/SQL variable pointing to the result set. We can get the rows of the cursor (FETCH)
Basic syntax for Oracle stored procedures
1. Basic structureCREATE OR REPLACE PROCEDURE Stored procedure name(Parameter 1 in number,Parameter 2 in number) isVariable 1 INTEGER: = 0;Variable 2 DATE;BEGIN
End Stored Procedure name
2.SELECT into
A few days ago, I saw some friends. To export data from Oracle, you can use Pl/sql devoleper and export tables to export data from n tables to insert INTO statements, but how to export them with SQL statements, only with SQL constructs, Here's the
In multiple data using dynamic SQL to pass in a string
1. Dynamic SQL Incoming stringCREATE OR REPLACE PROCEDURE p_test (V_str VARCHAR2) as TYPE Cur_type is REF CURSOR ;c_fzt Cur_type;V_sql VARCHAR2( -);V_JRH VARCHAR2( -);BEGINV_sql:=' SELECT
One: Static SQLSQL statements have been written (determined at compile time) when writing the PL-SQL programDDL and Session control statements cannot be used directly in PL/SQLTwo: Dynamic SQLSQL statements are not yet deterministic when writing a
For enterprise-Class large systems, the importance of Oracle databases is self-evident, and as a long-term use of SQL Server developer, it took a little time to learn a series of Oracle courses and summarize them.1.oracle some basic commandsSql*plus
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.