Message-Id: <10513.107210@fatcity.com> From: Jane Gao Date: Wed, 31 May 2000 14:38:57 +0800 Subject: RE: help with query :) This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BFCACA.E5FAD00C Content-Type: text/plain Try this query: select * from yourtable minus (select * from yourtable where rownum <= (select count(*) - 5 from yourtable)); Hope it helps Jane Gao Senior Application Support Analyst Kalgoorlie Consolidated Gold Mines --------------------------------------------------------------------------- > * Phone : (08) 9022 1129 *Fax : (08) 9022 1119 > *Address : PMB 27 KALGOORLIE WA 6430 > *E-mail : jgao@kalgold.com.au > > > -----Original Message----- > From: Yohans Mendoza [SMTP:yohans@demiurge.sirius-images.net] > Sent: Wed, 31 May 2000 08:25 > To: Multiple recipients of list ORACLE-L > Subject: help with query :) > > hi all, > > hope you're ok > I have this "silly" question. Is there an easy way to retrieve the last 10 > records that have been entered in a given table? > > TIA > > --Yohans > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~~~~~ > Yohans Mendoza System Analyst > yohans@sirius-images.com Sirius Images Inc. > http://www.sirius-images.net/users/yohans http://www.sirius-images.com > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~~~~~ > > -- > Author: Yohans Mendoza > INET: yohans@demiurge.sirius-images.net > > 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@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). ------_=_NextPart_001_01BFCACA.E5FAD00C Content-Type: text/html Content-Transfer-Encoding: quoted-printable RE: help with query :)

Try this = query:

select * from = yourtable minus
(select * from = yourtable where rownum <=3D (select count(*) - 5 from = yourtable));

Hope it helps =

Jane Gao
Senior Application Support = Analyst
Kalgoorlie Consolidated Gold = Mines
---------------------------------------------------------= ------------------
( Phone :  (08) 9022 1129
.Fax    =         :  (08) 9022 = 1119
+Address        = :  PMB 27
        =             KALGOORLIE  WA  = 6430
*E-mail :  jgao@kalgold.com.au