Search | Archive | Categories
DB2 does not have the built-in ability to only return a page of data in a select query. In MySQL, you can do this by:

select * from test_table limit 10,5

DB2 doesn't support any limit functionality. But, it turns out there is a tricky way to do it:

select * from
( select rownumber() over(order by test_col asc) as row_,
from test_table
order by test_col asc )
where row_ between 10 and 15

Posted: 2004-03-12 15:12:16

<< Madrid bombingGenuine Parts Article >>