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 -> How to get the first 10 rows of a table

How to get the first 10 rows of a table

From: Norman Dunbar <Norman.Dunbar_at_lfs.co.uk>
Date: Mon, 15 Apr 2002 14:12:18 +0100
Message-ID: <E2F6A70FE45242488C865C3BC1245DA701F2B947@lnewton.leeds.lfs.co.uk>


Frank,

if you want the first 10 rows in the table as returned by the query 'select * from table' then the answer posted by Richard Z will suffice.

If, on the other hand, you want the first 10 rows inserted into the table, in the order they were inserted, then I'm afraid you have no chance - unless your rows have a date & timestamp.

There is an article here
http://www.oracle.com/oramag/oracle/01-nov/index.html?o61asktom.html which explains why not. (It's based on getting the final row from a table, but the workings are identical.) Scroll down past the first two questions to get to the 'last row' bit.

Regards,
Norman.



Norman Dunbar			EMail:	Norman.Dunbar_at_LFS.co.uk
Database/Unix administrator	Phone:	0113 289 6265
				Fax:	0113 289 3146
Lynx Financial Systems Ltd.	URL:	http://www.Lynx-FS.com

------------------------------------------------------------------------

-----Original Message-----

From: frank [mailto:frankw_at_qd.lucent.com] Posted At: Monday, April 15, 2002 9:21 AM Posted To: server
Conversation: How to get the first 10 rows of a table Subject: How to get the first 10 rows of a table

Hi,

I want to know how can I get the first 10 rows of a table's data. (Oracle 8.1.6)

Thanks in advance
Frank Received on Mon Apr 15 2002 - 08:12:18 CDT

Original text of this message

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