`
guozheng
  • 浏览: 70536 次
  • 性别: Icon_minigender_1
  • 来自: 郑州
社区版块
存档分类
最新评论

db2 取数据 前十条 后十条

    博客分类:
  • sql
DB2 
阅读更多

db2 数据库 取最老的十条数据

select * from tablename where 1=1 fetch first 10 rows only

 

取最新的十条数据top(10)

select * from tablename where 1=1 order by id desc  fetch first 10 rows only

1
1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics