当前位置: 首页 > 网络学院 > 服务端脚本教程 > SQL > SQL 的MAX函数

SQL
SQL Create View
SQL Server
SQL 速查
SQL 摘要
MYSQL 列类型存储需求

SQL 的MAX函数


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 397 ::
收藏到网摘: n/a

The MAX function returns the highest value in a column. NULL values are not included in the calculation.
使用MAX函数可以将一列中的最大值返回出来。NULL值不包括在内。

语法

SELECT MAX(column) FROM table

举例

SELECT MAX(Age) FROM Persons

返回:

45

Note: The MIN and MAX functions can also be used on text columns, to find the highest or lowest value in alphabetical order.
注意: MIN和MAX函数都可以在文字列中使用,可以找到以字母排序中的最大值或是最小值。

评论 (0) All

登陆 | 还没注册?