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 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

COMMIT Statement The COMMIT statement explicitly makes everlasting changes to the database during the present transaction. The Changes made to the database are not considered e

Creating a SQL file 1. Open a new file in Notepad++ and save it to the location c:\mysql\bin, with the name lab8script.sql (the file extension should be .sql ). Add a MySQL co

Project Description: I have two types of data sources. One that is a list in SharePoint and another that is an access desktop database. The access desktop database is fairly com

Negation (NOT, ¬) - SQL There are three rows instead of just two. As you can see, ¬ p is defined as in two-valued logic (2VL) when p is either true or false, but ¬ (unknown) i

Number Types The Number types permit you to store the numeric data (real numbers, integers, and floating-point numbers), show quantities, and do computations. BINARY_INTEG

UPDATE Statement   The UPDATE statement transforms the values of the specified columns in one or more rows in the table or view. Syntax:

Multiple Assignment- SQL SQL supports multiple assignment to local variables and also applies multiple assignment semantics in SET clauses of UPDATE statements, but does not

I need to write one function and one procedure to query a Oracle 10.1 DB using PL SQL. I have the schema and exact queries...along with work Ive started and a template to put the a

Using EXCEPTION_INIT To handle unnamed internal exceptions, you should use the OTHERS handler or the pragma EXCEPTION_INIT. The pragma is a compiler directive that can be th