How to fix "function not allowed" when using row_number() over a view? <pre><code>select * from ( select a.*,row_number() over() as rk from table1 tba ) as foo where rk between 11 and 20 </code></pre> <p>This works for database table. I am using a view which is a join of 2 tables. When i try to do rownum it is saying: "<strong>Function not allowed</strong>"</p> <pre><code>select * from ( select a.*,row_number() over() as rk from view1 v1 ) as foo where rk between 11 and 20 </code></pre> <p>Any suggestion or alternative for rownum in DB2?</p>