Keyword and parameter description - cursors, PL-SQL Programming

Assignment Help:

Keyword and Parameter Description

select_statement:

This is a query which returns a result set of the rows. Its syntax is such that of select_ into_statement without the INTO clause.  When the cursor declaration declares the parameters, then each parameter should be used in the query.

RETURN:

This keyword introduces the RETURN clause that specifies the datatype of a cursor result value. You can use the %ROWTYPE attribute in the RETURN clause to give a record type that presents a row in the database table or a row returned by the formerly declared cursor. You can also use the %TYPE attribute to give the datatype of a formerly declared record.

The cursor body should have a SELECT statement and similar RETURN clause as its corresponding cursor specification. Also, the order, number, and datatypes of select items in the SELECT clause should match the RETURN clause.

parameter_name:

This identifies a cursor parameter; which is, a variable declared as the formal parameter of the cursor. The cursor parameter can become visible in a query where a constant can appear. The formal parameters of the cursor should be IN parameters. The query can also reference the other PL/SQL variables within its scope.

db_table_name:

This identifies a database table (or view) that should be accessible when the declaration is explained.

cursor_name:

This identifies an explicit cursor earlier declared within the present scope.

 record_name:

This identifies a user-defined record formerly declared within the present scope.

 record_type_name:

This identifies a RECORD type formerly defined within the present scope.


Related Discussions:- Keyword and parameter description - cursors

For-loop -iterative control, FOR-LOOP While the number of iterations thr...

FOR-LOOP While the number of iterations through a WHILE loop is unknown till the loop completes, then the number of iterations through a FOR loop is known before the loop is ent

Important distinctions, Important Distinctions The list of important d...

Important Distinctions The list of important distinctions are given below: Value versus variable Syntax versus semantics Variable versus variable reference

Sql query on hospital database, Perform the following queries on the Hospit...

Perform the following queries on the Hospital1.DB using SQL Anywhere (START EARLY!). a. Which patients have purchased the drug "Tylenol"? List the names and addresses. Arrange the

Create Tables, Hi there, I have the final part of a submission to do, it ...

Hi there, I have the final part of a submission to do, it is a demonstration that takes place tomorrow. I do not have to use previous information, but i have resources that sho

Theory of special creation - origin of life, THEO R Y OF SPECIAL CREATION...

THEO R Y OF SPECIAL CREATION - Life originated on the earth due to natural events by the super natural power. The biblical story of creation of world within six days was p

Cursor attributes in dynamic sql - pl sql, Using Cursor Attributes: Ev...

Using Cursor Attributes: Every cursor has 4 attributes: %NOTFOUND, %FOUND, %ISOPEN, and %ROWCOUNT. If appended to the cursor name, they return the helpful information about

Null statement-sequential control, NULL Statement The NULL statement c...

NULL Statement The NULL statement clearly specifies in action; it does nothing other than to pass control to the next statement. It can, though, improve the readability. In a

Between and not between operator in sql, BETWEEN and NOT BETWEEN Operator i...

BETWEEN and NOT BETWEEN Operator in SQL Example: Restricting exam marks to between 0 and 100 CREATE ASSERTION Marks_between_0_and_100 CHECK (NOT EXISTS (SELECT * FROM

Definition of from - sql, Definition of FROM - SQL Recall that the ope...

Definition of FROM - SQL Recall that the operand of FROM is denoted by a commalist, each element of that commalist being a table expression optionally accompanied by a range v

Cursors in pl/sql, Cursors The Oracle uses work areas to execute the SQ...

Cursors The Oracle uses work areas to execute the SQL statements and to store process information. A PL/SQL construct known as the cursor. Let's you assume name a work area and

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd