Re: SQL question.

From: shailaja <saila_at_irmac.com>
Date: Tue, 15 Jun 1999 15:48:55 -0500
Message-ID: <929479641.631.17_at_news.remarQ.com>


Give the below query and while running the query give the input which represents how many records u want to see from last. Let us say u want to view the last 10 records as u said give the input as 10.

"select * from (select e.*,rownum p from emp e) where p > (select count(*)-&1 from emp)"

Shailaja

[Quoted] Roberto Pérez Lita <rperez_at_tissat.es> wrote in message news:3760B12C.A9D5643B_at_tissat.es...
> 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.
>
Received on Tue Jun 15 1999 - 22:48:55 CEST

Original text of this message