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

SQL
SQL 介绍
SQL Select
SQL Where 子句
SQL Insert
SQL Update
SQL Delete
SQL 技能测试
SQL Order By
SQL 与 & OR
SQL In
SQL Between
SQL Aliases
SQL Join
SQL Union
SQL Create
SQL Drop
SQL Alter
SQL 函数
SQL Group By
SQL Select Into

SQL LAST 函数


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 486 ::
收藏到网摘: 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

登陆 | 还没注册?