select * from table_name where no=(select max(no) from table_name)

解决方案 »

  1.   

    SQL> select * from ta;        ID NAME                N
    ---------- ---------- ----------
             1 aaa                 1
             2 bbb                 1
    SQL> select * from (select id,name,n,rank() over(order by id) rid from ta) t
      2  where rid=1;        ID NAME                N        RID
    ---------- ---------- ---------- ----------
             1 aaa                 1          1SQL>