Keyword and parameter description - cursors, PL-SQL Programming

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.

Posted Date: 10/8/2012 5:55:16 AM | Location : United States







Related Discussions:- Keyword and parameter description - cursors, Assignment Help, Ask Question on Keyword and parameter description - cursors, Get Answer, Expert's Help, Keyword and parameter description - cursors Discussions

Write discussion on Keyword and parameter description - cursors
Your posts are moderated
Related Questions
Using Savepoints The scope of the savepoint is a transaction in which it is defined. The Savepoints defined in the major transaction are not related to the savepoints defined

what is the use of declare keyword

Develop Data Business Intelligence Project Project Description: We are linking our Microsoft SQL Database to GoodData Business Intelligence. We are seeking somebody who has e

Redeclaring Predefined Exceptions Keep in mind that, the PL/SQL declares predefined exceptions globally in the package STANDARD; Therefore you need not declare them yourself.

How Transactions Guard Your Database The transaction is a sequence of SQL data manipulation statements which does a logical unit of work. The Oracle treats the sequence of SQL

THEO R Y OF PANSPERMIA - Arrhenius (1908) postulated the cosmic panspermia theory that claims that organisms existed throughout the universe, and their spores, etc., could

Relational Operators and Logical Operators It prepares the ground for subsequent sections in which each specific relational operator is paired with its logical counterpart, su

Logical Connectives - SQL SQL's extended truth tables in which the symbol, for unknown, appears along with the usual T and F. Negation (NOT, ¬) Conjunction (

Using SET TRANSACTION You use the SET TRANSACTION statement to begin the read-only or read-write transaction, start an isolation level, or assign your present transaction to a

Type versus Representation Confusion in SQL This describes how a value might have two or more distinct representations. For example, user-defined type POINT might have a decla