首先,查找某字段的最大值
select max(weight) from apple;
接着,根据最大值,查找其所在行
select * from apple where weight =7888;
合并在一起就是
select * from apple where weight = (select max(weight) from apple);
Mysql max 查询最大记录所在行数据
首先,查找某字段的最大值
select max(weight) from apple;
接着,根据最大值,查找其所在行
select * from apple where weight =7888;
合并在一起就是
select * from apple where weight = (select max(weight) from apple);