3

mysql中求多个数字的最大值

 3 years ago
source link: http://www.hechunbo.com/index.php/archives/377.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

1.求多个数字中的最大值
SELECT GREATEST(5,16,2) AS GREATEST;
输出为16.

2.求多个数字中的最小值
SELECT LEAST(5,16,2) AS LEAST;

creativecommons-cc.png
本文由 hcb 创作,采用 知识共享署名 3.0,可自由转载、引用,但需署名作者且注明文章出处。

还不快抢沙发

添加新评论


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK