Re: RETRIEVING LAST X NUMBER OF ROWS FROM A ORACLE DATABASE TABLE
From: Craig Harper <caharper_at_hooked.net>
Date: 1996/05/26
Message-ID: <31A8EFC3.7C94_at_hooked.net>#1/1
Date: 1996/05/26
Message-ID: <31A8EFC3.7C94_at_hooked.net>#1/1
100656.1571_at_compuserve.com wrote:
>
> Does anyone know if how it possible to retrieve the last x number of rows added to a database table using a SQL statement.
That depends on the structure of your table and what you are looking for (inserts only or updates too). Are you using a sequence generator? If so you could select * from table where ID > than some variable representing the last record you ended the previous select on. I'm sure you get the idea. This won't give you updates however, or help you if your sequence generator loops.
Good luck
-- Craig Harper IFTN (v) 415.583.4528 (f) 415.583.5536 Thinking is more interesting than knowing, but less interesting than looking.Received on Sun May 26 1996 - 00:00:00 CEST