首页
IT
登录
6mi
u
盘
搜
搜 索
IT
sql如何找到某字段的最大值所在行
sql如何找到某字段的最大值所在行
xiaoxiao
2021-03-25
85
首先,查找某字段的最大值
select
max
(
weight
)
from
apple
;
7888
接着,根据最大值,查找其所在行
select * from apple where weight =7888;
或者,有一个更简单的方式:
select * from apple order by weight desc limit 1;
转载请注明原文地址: https://ju.6miu.com/read-36693.html
技术
最新回复
(
0
)