Board index » delphi » Oracle 8 Syntax Question (vs. MS SQL)

Oracle 8 Syntax Question (vs. MS SQL)

Hi All,
 In MS SQL I can say "Select Top 10 * From Table"

Is there an equivalent in Oracle?  I know it does not support the Top
predicate but is their another way?

Thanks,
 Brent

 

Re:Oracle 8 Syntax Question (vs. MS SQL)


select * from table where rownum <= 10

[]s
Arthur

Brent Williams <bwilli...@netmerchants.net> escreveu nas notcias de
mensagem:8qb5va$q...@bornews.borland.com...

Quote
> Hi All,
>  In MS SQL I can say "Select Top 10 * From Table"

> Is there an equivalent in Oracle?  I know it does not support the Top
> predicate but is their another way?

> Thanks,
>  Brent

Re:Oracle 8 Syntax Question (vs. MS SQL)


Quote
> select * from table where rownum <= 10

Note that this only work (correct) for unordred selects. The RowNum (which
is like a hidden field) is assigned BEFORE ordering..

Cheers,
Lars

Other Threads