oracle 數據庫中查詢最新的一條記錄


select file_id from (

  select file_id ,

   row_number() over (PARTITION BY prod_nane order by time desc) as row_number

  from 表名

  where prod_name = #{prodname} and type = '02'

) temp

where temp.row_namber = '1'

 

取最新的一條記錄


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM