Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Hod do I select the last 100 records of a Table.
Here is an example of selecting last three.
SQL> select * from t;
TDATE
09-JAN-99 09-JAN-98 09-JAN-97 09-JAN-96 09-JAN-95 09-JAN-94
6 rows selected.
SQL> select * from t
2 minus
3 select * from t where rownum <= (select count(*)-3 from t);
TDATE
09-JAN-94 09-JAN-95 09-JAN-96
SQL>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Tue Jun 22 1999 - 08:31:34 CDT
![]() |
![]() |