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

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

SQL LAST 函数


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

The LAST function returns the value of the last record in the specified field.
使用LAST函数可以将指定区域内的最后一条记录返回出来

Tip: Use the ORDER BY clause to order the records!
提示:可以使用ORDER BY 子句来排列记录!

语法

SELECT LAST(column) AS [expression]
FROM table

举例

SELECT LAST(Age) AS highest_age
FROM Persons
ORDER BY Age

结果:

45

评论 (0) All

登陆 | 还没注册?