db2数据库表查询
db2数据库表Tab中无id,且数据量较大,如何指定查询中间十条数据,不是前十条,谢了。
[解决办法]
row_number over(order by col1) as rownum
where rownum >10 and rownum <= 20
其中col1最好是主键或者索引,用你的方法可以实现,但是性能堪忧
发布时间: 2012-12-30 10:43:15 作者: rapoo
db2数据库表查询
db2数据库表Tab中无id,且数据量较大,如何指定查询中间十条数据,不是前十条,谢了。
[解决办法]
row_number over(order by col1) as rownum
where rownum >10 and rownum <= 20
其中col1最好是主键或者索引,用你的方法可以实现,但是性能堪忧