Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: selecting only 10 rows
Ed Zappulla wrote:
> Does anyone know how to limit the number of rows returned from a select
> statement? I have 5000 rows in a table and just want to grab the first 10
> to look at a sample of them. I thought ROWId would do it but it doesn't
> seem to work. SQLSERVER uses set rowcount = 10.
"Select * from your_table_name where rownum < 11;" should grab 10 rows. This works for 7.3.x and I think it also works for 8.0.x.
Hope this helps.
Ying-fen Hu Received on Thu Jan 07 1999 - 21:08:56 CST