Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PLSQL - Move the cursor backward

AAGJul 16 2014 — edited Jul 18 2014

I'd appreciate if anyone could please tell me if there is a way to go up one row up in plsql cursor.

For eg:

cursor cr is select id from emp where rownum < 21;

for var in cr

loop

<here in the second iteration onwards, i would like to compare the current var.id with "id Value of previous row" > 

end loop;

Any help in the logic can also be suggested.
Thanks for the help !

- AAG

This post has been answered by RajenB on Jul 17 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 15 2014
Added on Jul 16 2014
10 comments
5,562 views