mysql 如何判断大小而 更新 字段

mysql 如何判断大小而 更新 字段,第1张

$sql="update `a` set `open`=if(`open`<$d,$d,`open`),`close`=if(`close`>$d,$d,`close`)"

这样应该行吧,不过where条件没加哦

最大值:select max(num) from table

第二大值:select max(num) from table

where num not in(select max(num) from table)

第三大值:select max(num) from table

where num not in(select max(num) from table

where num not in(select max(num) from table))

最小值:select min(num) from table


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/7456256.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-05
下一篇 2023-04-05

发表评论

登录后才能评论

评论列表(0条)

保存