Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Display last records in a table
SQL> create table test_dates (my_int number, my_date date);
Table created.
SQL> declare i number;
2 begin
3 for i in 1 .. 1000 loop
4 insert into test_dates values(i,sysdate+i);
5 end loop
6 ;
7 end;
8 /
PL/SQL procedure successfully completed.
SQL> select count(*) from test_dates;
COUNT(*)
1000
SQL> select max(my_date) from test_dates;
MAX(MY_DA
MY_DATE
20-FEB-04 19-FEB-04 18-FEB-04 17-FEB-04 16-FEB-04 15-FEB-04 14-FEB-04 13-FEB-04 12-FEB-04
9 rows selected.
SQL> On Fri, 25 May 2001 17:04:59 +0200, "Thomas Stuefer" <stuefer_at_halli-data.at> wrote:
>How can i display the last records in a table with an select-statement ?
>
>For example:
>
>I have an table with many thousand of records and only want to display the
>last 10 added records.
>
>Many thanks for your help !
>
>Tom
>
>
Received on Sat May 26 2001 - 09:17:51 CDT