查询表table1里字段id小于10的所有数据,并且让数据根据id降序排列,然后得到第一条数据
select * from (
select * from table1 where id<10 order by id desc
) where rownum=1
注意:desc可以省略,默认的就是desc
查询表table1里字段id小于10的所有数据,并且让数据根据id降序排列,然后得到第一条数据
select * from (
select * from table1 where id<10 order by id desc
) where rownum=1
注意:desc可以省略,默认的就是desc
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。