Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain the two type of Cursors ?

Answers were Sorted based on User's Feedback



Explain the two type of Cursors ?..

Answer / joseph p v

2 Types
-Implicit Cursor
-Explicit Cursor

-Implicit Cursor
All select queries are examples of implicit cursor. While
submitting a select query , Oracle internally handle the
Open, fetch and close operations. Implicit Cursors are
using while query returns only row.

-Explicit Cursor
We want to explicitly define one cursor, open the cursor,
fetch and close the same. These type cursors are using
while the query return more than one row.

Ref Cursors are Cursors having the dynamic cursor statement
capabilities.

Is This Answer Correct ?    17 Yes 0 No

Explain the two type of Cursors ?..

Answer / tulsi

There are two types of cursors, Implict Cursor and Explicit
Cursor.
PL/SQL uses Implict Cursors for queries.
User defined cursors are called Explicit Cursors. They can
be declared and used.

Is This Answer Correct ?    15 Yes 2 No

Explain the two type of Cursors ?..

Answer / kotravel. b

1 inpilicite cursors
2 expilicite cursors

Is This Answer Correct ?    9 Yes 2 No

Explain the two type of Cursors ?..

Answer / gireesh.p.v

Implict Cursor and Explicit
Cursor.



& also REF CURSORS

Is This Answer Correct ?    8 Yes 2 No

Explain the two type of Cursors ?..

Answer / sachin fulari

Brief about Cursors
-------------------
Every SQL statement executed by Oracle has a Private SQL
area that contains info about SQL statement and the set of
data returned.
In PL/SQL, a cursor is a name assigned to a specific
private SQL area of a specific SQL Statement.
There can be either, Static Cursor whose SQL statements is
determined at compile time, or Dynamic Cursor, whose SQL
statement is determined at runtime.

Note: Dynamic Cursors are implemented using Oracle built in
package DBMS_SQL.

Implicit Cursors:
----------------
Any SQL statement that is executed directly or in an PL/SQL
block i.e. execution section or in exception section,
during which it is associated with a work area in memory of
oracle (SGA). This is done using implicit cursor by Oracle.
We do not need to declare implicit cursor hence not be
opened, fetched and closed.

Explicit Cursors:
-----------------

They are the SELECT statement that is declared explicitly
in the declaration section of current block or in a package
specification.
Further we can use open, fetch and close in execution
section or exception section of the block or program to
utilize declared cursor.

To use an explicit cursor we need to declare it in
declaration section of block or package specification.

There are three sub types of explicit cursors:

* Simple Cursor (without parameter)

CURSOR emp_cur IS
SELECT emp_id
FROM emp;

* Parameterized Cursor - That accepts arguments

CURSOR emp_cur (dept_in [IN] NUMBER) IS
SELECT emp_id
FROM emp
WHERE dept = dept_in ;
* Returning Cursor - A cursor header that contains
a return clause

CURSOR emp_cur (dept_in [IN] NUMBER) IS
RETURN emp%ROWTYPE
SELECT *
FROM emp;


Hope so, above paragraphs explain cursors very well and in
details.

Is This Answer Correct ?    6 Yes 0 No

Explain the two type of Cursors ?..

Answer / k minty

actually there are three types of cursors
1. static cursors which are further classified as implicit
cursors and explicit cursors
2. Dynamic Cursors
3. Reference Cursors.

Is This Answer Correct ?    2 Yes 0 No

Explain the two type of Cursors ?..

Answer / sachin fulari

To add upon
-----------

REF CURSOR is data type in Oracle, and to mention it as
dynamic cursor is totally erroneous.

We can declare variables of type REF CURSOR in declartion
section and which later on can associate with different
queries in execution section.

Moreover, we can also pass query as argument to procedures
using such data type.

( To easily understand REF CURSOR data type:
Visualize as if we are declaring a scalar data type like
NUMBER or CHAR and then utilizing it in execution
section.)

Is This Answer Correct ?    0 Yes 2 No

Explain the two type of Cursors ?..

Answer / james bond

<html>
<body>

<h1>Please give detail info</h1>

<p>on cursors.</p>

</body>
</html>

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More SQL PLSQL Interview Questions

Mention what plvcmt and plvrb does in pl/sql?

0 Answers  


How can i insert data inro a table with 3 columns using FORALL?

2 Answers   Oracle,


What does bitemporal mean?

0 Answers  


What type of database is cloud sql?

0 Answers  


Mention what are the benefits of pl/sql packages?

0 Answers  


Is there any problem if we use commit repeatedly after each dml statement in a plsq procedure ? (eg. there are 10 update stmt and using 10 commit stmt after each update stmt)

1 Answers  


What is a relationship and what are they?

0 Answers  


How can use stored procedures in sql?

0 Answers  


What are dml commands?

0 Answers  


What is the difference between delete, truncate and drop command?

0 Answers  


What is the difference between a primary key and a clustered index?

0 Answers  


Where is pl sql used?

0 Answers  


Categories