mysql求字段最大值和最小值

mysql求字段最大值和最小值,第1张

select max(字段名) from tableName limit 0,1 最大

select min(字段名) from tableName limit 0,1 最小

select * from tableName order by 字段名 DESC limit 0,1 最大

select * from tableName order by 字段名 ASC limit 0,1 最小

: select max(date) from ( select max(date) date from A unoin all select max(date) date from B ) a


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

原文地址:https://54852.com/zaji/7558013.html

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

发表评论

登录后才能评论

评论列表(0条)

    保存