Prepare for your Next Interview
This is a discussion on select * from within the SQL forums, part of the Databases category; select * from emp retrieves multiple records in emp. but why do we use cursors to retrieve multiple records?can we band using cursors concept ?can any body expain the differences ...
|
|||
|
select * from
select * from emp retrieves multiple records in emp.
but why do we use cursors to retrieve multiple records?can we band using cursors concept ?can any body expain the differences between select and cursor concept and one thing is it is better that to use the cursor when u are trying to fetch less than 3% of records from the utilities.most of times set based operations can be used instead of cursors.what are set based operations. regards jayanth |
| Sponsored Links |
|
|||
|
Re: select * from
Dear jayath,
In pl/sql you can't access the result of select statement directly unless you bring it into variables using select into statement. An sql query may return zero , one or more rows. If a query returns zero rows it raises no_data_found exception. If a query returns more than one row it raises too_many_rows exception.so it is must to declare explicit cursor to process multiple rows in pl/sql. Whenever we execute dml statements oracle uses private sql area to store the information. Cusors concept allows you to name that private sql area and access information stored in it. UNION ,UNION ALL ,MINUS,INTERSECT are called set operators. I hope now it is clear to you. Regards krishna Last edited by krishnaindia2007 : 03-04-2008 at 11:20 PM. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Select row by repeating | priyasp_msit | SQL | 3 | 06-27-2008 06:13 AM |
| Select within select | neeraj_sigh | SQL | 7 | 12-09-2007 04:59 AM |
| Which course to select fo IC engines | Geek_Guest | Career Advice | 0 | 09-20-2007 03:30 AM |
| Singleton select | sdresh | MainFrame | 2 | 09-11-2007 03:20 AM |
| I am not able to select the pop-up window | Geek_Guest | QTP | 0 | 07-12-2007 06:20 AM |