oracle 獲取某字段有最大值的那一行的整行記錄

oracle 獲取某字段有最大值的那一行的整行記錄

select * from ( 
	select r.*,row_number() over (order by r.age desc) rnum 
	from user r 
	where r.sex = '男'
) temp where rnum = 1;
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章