Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Finding out last 10 records
Hi Santosh,
i assume that u will b ordering the query based on some criteria .... so say u have table A with column x....
for finding the 1st 10 records we will use the following query:
select x from A
where rownum < 11
order by 1
/
for finding the last 10 records we will use the following query:
select x from A
where rownum < 11
order by 1 desc
/
the only difference is in the ordering...
i hope this helps u out..
rgds,
Ams..
www.medicomsoft.com
-----Original Message-----
From: root_at_fatcity.com [mailto:root_at_fatcity.com]On Behalf Of Santosh Varma
Sent: Wednesday, August 14, 2002 1:49 PM
To: Multiple recipients of list ORACLE-L
Subject: Finding out last 10 records
Hello all
Could any one of you guide me on how to select last 10 records from a table. and also finding out first 10 records..
Thanks and regards,
Santosh
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Amjad Saiyed INET: amjad_at_medicomsoft.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Aug 14 2002 - 05:23:20 CDT
![]() |
![]() |