Re: SQL question.
Date: Mon, 14 Jun 1999 07:43:19 GMT
Message-ID: <7k2bqm$j9u$1_at_nnrp1.deja.com>
[Quoted] This trick might help if you want to lookup last 10 rows according to some order:
SELECT *
FROM CUSTOMERS
WHERE ROWNUM<10
ORDER BY customer_id DESC (or anything else);
Regards,
M. Armaghan Saqib (armaghan_at_geocities.com)
Oracle Link for MS Excel. A free tool to integrate XL with Oracle.
http://www.geocities.com/WallStreet/Floor/8484/
In article <3760B12C.A9D5643B_at_tissat.es>, Roberto =?iso-8859-1?Q?P=E9rez?= Lita <rperez_at_tissat.es> wrote:
> Hello,
>
> I wonder if there is a way to select, for instance, the last 10 rows
of
> a table. I know that i can select the first 10 rows by:
>
> SELECT *
> FROM CUSTOMERS
> WHERE ROWNUM<10;
>
> Thanks in advance.
> Roberto Pérez Lita.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Mon Jun 14 1999 - 09:43:19 CEST