GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 235 of 241    Print  
Explicit cursor and Select into statement
what is the difference between an explicit cursor and select into statement?


  
Total Answers and Comments: 3 Last Update: September 14, 2009     Asked by: varma.ukk 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 03, 2008 07:10:21   #1  
neppalli Member Since: October 2008   Contribution: 1    

RE: Explicit cursor and Select into statement
Explicit cursors are those user defined cursors in order to retrive more than one row from a table. Select into statment helps in invoking parmeters into the formal parameters.
 
Is this answer useful? Yes | No
November 08, 2008 21:38:25   #2  
kz4ora Member Since: October 2008   Contribution: 2    

RE: Explicit cursor and Select into statement
Explicit cursor- They are defined by programmer.

The select statement can return multiple rows as a query result. If you want to process single row at a time then you can define an explicit cursor for this select statement.

Cursor is like a temporary area where you can process fetch the records and process then individually as required

select into statement-
select value1 value2... into var1 var2......

 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
September 13, 2009 14:39:45   #3  
promisinganuj Member Since: September 2009   Contribution: 3    

RE: Explicit cursor and Select into statement

When a cursor name is explicitly assigned to a SELECT statement through CURSOR statement it is called an explicit cursor. Explicit cursors are generally used to work with more than one row within PL/SQL. It has got the following attributes:
1. Defining the Cursor
2. Opening the Cursor
3. Fetching rows(values) from Cursor (one at a time)
4. Closing the Cursor

SELECT into statement allows you to retrives the query result in user defined variables. But the limitation here is that the query must return a single row. Its a best practice to handle NO_DATA_FOUND and TOO_MANY_ROWS exception when dealing with "SELECT INTO" statement.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape