Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: selecting only 10 rows

Re: selecting only 10 rows

From: Ying-fen Hu <yhu_at_generalmicro.com>
Date: Thu, 07 Jan 1999 22:08:56 -0500
Message-ID: <369576C7.FCAFAAD3@generalmicro.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US