Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i loop through a cursor using fetch statement

Status
Not open for further replies.

2314

Programmer
May 19, 2001
69
IN
how do i loop through a cursor using fetch statement
 
Code:
OPEN my_cursor(params?);
LOOP
  FETCH my_cursor INTO my_vars;
--
  EXIT WHEN my_cursor%NOTFOUND;
END LOOP;

or, better is without FETCH:

Code:
FOR c IN my_cursor(params?)
LOOP
  do_something;
END LOOP;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top