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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Finding out last 10 records

Re: Finding out last 10 records

From: Jan Pruner <jan_at_pruner.cz>
Date: Wed, 14 Aug 2002 04:03:52 -0800
Message-ID: <F001.004B41AC.20020814040352@fatcity.com>


If you have a sequence column in table ála primary key: select * from (select * from table order by sequence desc) where rownum < 11;

Bu you don't have it - no way how to determine last 10 inserted records in table.

Jan Pruner

> ----- Original Message -----
> From: Santosh Varma
> To: Multiple recipients of list ORACLE-L
> Sent: Wednesday, August 14, 2002 11:48 AM
> 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: Jan Pruner
  INET: jan_at_pruner.cz

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 - 07:03:52 CDT

Original text of this message

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