Tuesday, February 12, 2013

Pl Sql

9 Cursors in PL/SQL:
Every SQL didactics executed by the RDBMS has a private SQL sphere that contains information about the SQL narration and the set of data returned. In PL/SQL, a pointer is a name assigned to a specific private SQL bea for a specific SQL statement. There lavatory be all static cursors, whose SQL statement is determined at compile time, or dynamic cursors, whose SQL statement is determined at runtime. Static cursors be covered in greater detail in this section. propellent cursors in PL/SQL are implemented via the built-in package DBMS_SQL.
9.1 diaphanous Cursors
Explicit cursors are SELECT statements that are DECLARED definitely in the contract bridge section of the current block. Use undecided, FETCH, and attached in the execution or exception sections of our programs.
9.1.1 Declaring explicit cursors
To aim an explicit cursor, we must first declare it in the contract bridge section of a block or package.

Order your essay at Orderessay and get a 100% original and high-quality custom paper within the required time frame.

There are three types of explicit cursor declarations:
A cursor without contentions, such as:
CURSOR go with_cur
IS
SELECT company_id FROM company;
A cursor that accepts arguments through a parameter list:
CURSOR company_cur (id_in IN NUMBER) IS
SELECT name FROM company
WHERE company_id = id_in;
A cursor header that contains a RETURN clause in place of the SELECT statement:
CURSOR company_cur (id_in IN NUMBER)
RETURN company%ROWTYPE IS
SELECT * FROM company;
This technique can be used in packages to conceal the implementation of the cursor in the package body.
9.1.2 Opening explicit cursors
To open a cursor, use the following syntax:
OPEN cursor_name [(argument [,argument ...])];
where cursor_name is the name of the cursor as declared in the declaration section. The arguments are required if the definition of the cursor contains a parameter list.
We must open an explicit cursor before you can fetch rows from that cursor. When the cursor is opened, the processing includes...If you want to get a full essay, order it on our website: Orderessay



If you want to get a full essay, wisit our page: write my essay .

No comments:

Post a Comment