查询表table1里字段id小于10的所有数据,并且让数据根据id降序排列,然后得到第一条数据

select * from (
select * from table1 where id<10 order by id desc

) where rownum=1

注意:desc可以省略,默认的就是desc

相关文章:

  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
  • 2021-12-08
  • 2021-08-15
  • 2022-01-25
猜你喜欢
  • 2022-12-23
  • 2023-03-18
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
相关资源
相似解决方案