Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: query question
Huh...that was exactly what I was looking for, Im just wondering why i didnt figure that out myself.
THANKS!
> for next row:
> select *
> from (
> select *
> from emp
> where empno >= :current_empno -- or, if unique, just '>'
> and rowid <> :current_rowid -- not required if sort value is
> unique
> order by empno
> )
> where rownum = 1;
>
> for previous row:
> select *
> from (
> select *
> from emp
> where empno <= :current_empno -- or, if unique, just '<'
> and rowid <> :current_rowid -- not required if sort value is
> unique
> order by empno desc
> )
> where rownum = 1
>
> ;-{ mcs
>
>
Received on Thu Apr 01 2004 - 18:24:24 CST