1. 程式人生 > >sql如何找到某欄位的最大值所在行

sql如何找到某欄位的最大值所在行

首先,查詢某欄位的最大值

select max(weight) from apple;
7888

接著,根據最大值,查詢其所在行

select * from apple where weight =7888;