The stored procedure of Oracle returns the record set, and finds that the two Oracle segments are the same, but the C # section is slightly different and put up. I prefer to use the first one. C # Call the Oracle stored procedure to return
To allow PL/SQL functions to return multiple rows of data, a ref cursor or a data set must be returned. Ref cursor is limited to the data that can be selected from the query. The entire set must be specific before it can be returned. Oracle 9i
At ordinary times, we usually need to write some small PL/SQL programs, triggers, functions, packages, and so on. The following is a small example, where sparrows are kept small and dirty. You can draw a line from each other.
Conn HR/hr
SQL> Create
PL/SQL programmingOverview: it is an extension of Oracle in the standard SQL language. It supports not only embedding SQL languages, but also customizing constants and variables.Conditional statements, loop statements, logical control statements,
1 For LoopSyntax: beginFor I in reverse 1 .. 10 loopInsert into users values (I, 'Obama ');End loop;End;Note: The Circular Variable I is implicitly added, so it cannot be seen2 goto statementsThe goto statement is used to jump to a specific position
Stored Procedure with returned values (list result set)Case: Write a process, enter the Department number, and return the information of all employees of the Department. The analysis of this question is as follows:Since Oracle stored procedures do
I. Overview
In Oracle block programming (begin series), because it does not support the form of select... from... returned result set, results can only be returned in the form of output parameters. As a structure that encapsulates the result set
The seventh day of oracle learning and the seventh day of oracle LearningZookeeper
1. Review in the previous section2. Advanced PL/SQL3. oracle View4. oracle triggersObjectives:1. Master advanced PL/SQL usage (the paging Process Module and the order
Oracle universal paging Stored Procedure
Oracle universal paging Stored Procedure
-- Create a package and define a cursor type in the packageCreate or replace package testfenyepackageType test_cursor is ref cursor;End testfenyepackage;
-- Compile
I. Role of Oracle package
1. Definition and descriptionA. encapsulation of related objects (custom types, functions, stored procedures, etc.)B.ProgramEach part of the package-Package type descriptionDeclaration subroutine-Package subjectDefine
Some ASP. NET + Oracle 11g learning and writing essays. This seriesArticleIt can help. net that is unfamiliar with Oracle and is not even used at all.ProgramStaff, can get started and develop applications in the shortest time, to avoid having to
Oracle supports returning the result set after calling the stored procedure through the ref cursor. Using the cursor is much better than returning array variables in terms of memory consumption and time!
Example: Create a package for the
This example briefly introduces the locking and consistent read problems involved in the four processes of cursor processing.
Explicit cursor processing requires four PL/SQL steps:
1. Define/declare a cursor: defines a cursor name and the SELECT
/*************************************** *********Cursor and I
When I was a senior, I was about to start looking for a job. In the crowded talent market, I approached a company that recruited VB programmers with enthusiasm. An uncle asked me, have
a table function can accept a query statement or a cursor as an input parameter and can output multiple rows of data. The function can be executed in parallel, and the data stream can be continuously output, known as pipeline output. The table
Oracle Stored procedures:
Grammar:CREATE [OR REPLACE] PROCEDURE procedure_name(Arg1 [Mode1] datatype1,arg2 [Mode2] datatype2,...)is [as]Pl/sql Block;Mode is used to specify the input and output parameters: In is an input parameter, out is an output
The error occurs because a read cursor reads less than one or more columns during the execution of a stored procedure operation.
However, this does not seem likely to happen because the compile phase will be an error.
The following shows the
1, the row and column conversion of fixed number
Such as
Student Subject Grade
--------- ---------- --------
Student1 Language 80
Student1 Math 70
Student1 English 60
Student2 Language 90
Student2 Math 80
Student2 English 100
......
Converted
use of functions and cursors in Oracle
--Creates a function and invokes the CREATE function fun1 (v_in_ename varchar2) return number is v_annual_sal number;
Begin Select (SAL+NVL (comm,0)) *13 into V_annual_sal from EMP where
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.