On Thursday 15 May 2008 01:12:21 Six Fried Rice wrote: > You can write your query like this: > > SELECT ROW_NUMBER() OVER() as rownum, spool_table.* FROM spool_table > ORDER BY date_inserted WHERE rownum <= 100 > > And it should do the trick. This requires Derby 10.4.
This is quite interesting. Is there also a way to do this if you need to join to another table, such that it selects rows 100 to 200 of the first table before doing the join to the second? Daniel
