oracle中先排序再获取前十条数据sql
一、oracle中的rownum排序方法select t.* from test_ord_log t where rownum<10 order by trans_Date desc:###意思为从该表中获取10条数据 然后再按照日期排序select *From (select t.* from test_ord_log t order by trans_Date desc) tt wher
·
一、oracle中的rownum排序方法
select t.* from test_ord_log t where rownum<10 order by trans_Date desc:###意思为从该表中获取10条数据 然后再按照日期排序
select *From (select t.* from test_ord_log t order by trans_Date desc) tt where rownum<10;###意思为将该表按照日期排序,然后再取前十条数据使用
更多推荐
已为社区贡献1条内容
所有评论(0)