db2中不支持top n和limit m, n语法,只能用db2自己的方式来实现
top n
这样可以取出按field_name降序排列的top n条记录
limit m,n
top n
SELECT * FROM table_name where *** order by field_name desc FETCH FIRST n ROW ONLY
这样可以取出按field_name降序排列的top n条记录
limit m,n
select * from (select *,ROW_NUMBER() OVER (order by field_name desc) AS RN from table_name where ***) as col where RN between m and n