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

Third step at defining type sid in sql, Third Step at defining type SID in ...

Third Step at defining type SID in SQL CREATE DOMAIN SID AS VARCHAR(5) CHECK ( VALUE IS NOT NULL AND SUBSTRING(VALUE FROM 1 FOR 1) = 'S' AND CAST('+'||SUBSTRING(VALUE

Set operators - sql operators, Set Operators The Set operators combine...

Set Operators The Set operators combine the results of the two queries into one result. The INTERSECT returns all the distinct rows selected by both queries. The MINUS returns

Procedures - syntax, Procedures The procedure is a subprogram which can...

Procedures The procedure is a subprogram which can take parameters and be invoked. Normally, you can use a procedure to perform an action. The procedure has 2 sections: the spe

Data types, Datatypes Every constant and variable has a datatype that s...

Datatypes Every constant and variable has a datatype that specifies the storage format, constraints, and the valid range of values. The PL/SQL gives a variety of predefined dat

Existential quantification - sql, Existential Quantification - SQL Ex...

Existential Quantification - SQL Existential quantification-stating that something is true of at least one object under consideration-can be expressed by OR(r,c), meaning tha

Using lock table, Using LOCK TABLE You use the LOCK TABLE statement to...

Using LOCK TABLE You use the LOCK TABLE statement to lock the whole database tables in the specified lock mode so that you can share or deny the access to them. For illustrati

Information hiding in pl/sql, Information Hiding   With the informatio...

Information Hiding   With the information hiding, you see only the details that are significant at a given level of algorithm and data structure design. The Information hiding

Declare keyword description in pl sql, DECLARE : This keyword signals t...

DECLARE : This keyword signals the beginning of the declarative section of the PL/SQL block, that contains local declarations. The Items declared locally exist only within the

Procedure, 1. Create a procedure called TAX_COST_SP to accomplish the tax c...

1. Create a procedure called TAX_COST_SP to accomplish the tax calculation task. Keep in mind that the state and subtotal values are inputs into the procedure and the procedure is

Cursor variables, What Are Cursor Variables  ? The Cursor variables ar...

What Are Cursor Variables  ? The Cursor variables are like C or Pascal pointers that hold the memory location (address) of some item rather of the item itself. Therefore, decl

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