Hi, in Cursors this is the Scenario.if i am manipulating the data of a table which has 10 records,i need to go to the 5th record.how is it possible?What is the Exact usage of Ref Cursor?

Showing Answers 1 - 1 of 1 Answers

Navin

  • Mar 2nd, 2006
 

A ref cursor is a type that you can define in the declare section of your PL/SQL program. You can then open this cursor for any SQL statement that you construct dynamically in your program.

For your othr question of navigating to the 5th record, you can user a loop. Something like.

i:=1;

FOR cursor_rec IN cursor(...)

LOOP

IF (i=5) THEN

<do what you like >

ELSE

i:=i+1;

END IF;

END LOOP;

--

HTH,

Navin.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions