取排序后的前几行,应该用:

select * from(select * from test order by stamp desc) where rownum<= 6  (表示排序后取前几行)

 

而不应该使用:

select * from test where rownum<= 6  order by stamp desc (表示取前几行后再排序)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2023-03-11
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案