Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Limiting the number of returned rows with Oracle
(emp = sample table)
SQL>SELECT * 2>FROM emp 3>WHERE rownum < 6;
Note this doesn't work for sorts i.e. you can't approximate a 'Top 10 by size' type of query with rownum.
David P. OCP (DBA) MCP (TCP/IP)
Glasgow, Scotland.
converse_at_tanyelcp650.brightware.com wrote:
>
> Is there a way to limit the number of returned records to a given number
> with Oracle with SQL?
>
> Something like: "select * from table and return first five rows"
>
> thanks,
>
> Cem
Received on Tue Jun 06 2000 - 00:00:00 CDT