fetch question. plz help ; [message #36707] |
Thu, 13 December 2001 15:26 |
Johnny
Messages: 15 Registered: October 2000
|
Junior Member |
|
|
im trying to figure out this code and what it all menas as im new. can someone please explin to me what this does in simple terms. thanks
open c_category;
loop
fetch c_catergory into var_car_id, var catergory;
exit when (c_categrory%not found;
var_least_price := null
thanks
----------------------------------------------------------------------
|
|
|
Re: fetch question. plz help ; [message #36708 is a reply to message #36707] |
Thu, 13 December 2001 16:42 |
Suresh Vemulapalli
Messages: 624 Registered: August 2000
|
Senior Member |
|
|
would suggest you to read CURSORS chapter of pl/sql programming.
1)open c_category
this stmt will open pre declared cursor
2) loop
this is loop stmt
3) fetch c_catergory into var_car_id, var catergory;
3rd stmt fetch values into local variables from opened cursor
4)exit when (c_categrory%not found);
this stmt tells pl/sql ,exit loop when it reaches last record
----------------------------------------------------------------------
|
|
|