其实就是分页查询的另一种应用:
select * from (
select tb.*,rownum from table_name tb where column_name like '20080311%' order by id)
where rownum=1
select * from (select * from <table> order by <key>) where rownum=1;
原文链接:https://www.f2er.com/oracle/206000.htmlselect * from (
select tb.*,rownum from table_name tb where column_name like '20080311%' order by id)
where rownum=1
select * from (select * from <table> order by <key>) where rownum=1;
select * from (select * from <table> order by <key> desc) where rownum=1;
oracle中选出某个字段里面最大值的记录的sql语句怎么写?2种写法:select max(testfld) from test_table;select testfld from test_tablewhere rownum = 1order by testfld desc;一般只用第一种就行了。