Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SELECT TOP N
Oracle select range:
select column
from table
where condition
and rownum = n
where n in the nth row number in the result set. you can also use <. >, <=, >=.
I don't know if this is Oracle 8 compliant, though.
HAP On 22 Jul 1998 06:18:48 GMT, paulkcng_at_news.netvigator.com (Ng K C Paul) wrote:
>The identity() function only works in SYBASE. How about ORACLE and MSSQL
>
>Notus Spamus (spam_at_verio.com) wrote:
>: select seq = identity(9), *
>: into #tmp from tbl
>: order by some_columns
>: select *
>: from #tmp
>: where seq = @N
>:
>: Or expand to a range:
>: where seq between @M and @N
>:
>: Ng K C Paul wrote:
>: >
>: > How about if I want the Nth record only and I want N is a parameter
>: > passed to a stored procedure. Can I do that?
>: >
Received on Tue Aug 11 1998 - 00:00:00 CDT