Getting the last record in SQL in WHERE condition

后端 未结 9 2304
借酒劲吻你
借酒劲吻你 2021-02-15 04:24

i have loanTable that contain two field loan_id and status

loan_id status
==============
1       0
2       9
1       6
         


        
9条回答
  •  Happy的楠姐
    2021-02-15 04:32

    In oracle database this is very simple.

    select * from (select * from loanTable order by rownum desc) where rownum=1

提交回复
热议问题