If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
with t as (select card, row_number() over() as col2 from syscat.tables order by 1 desc) select * from t where col2 between 11 and 20 order by 2 asc
There really needs to be a ORDER BY in the OVER function, otherwise one will have no idea what rows 11 thru 20 are, and the order will not be be repeatable (one will not get the same rows every time), and the query will make no sense.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390