注音拼音怎么打:SQL Server中的 函数问题

来源:百度文库 编辑:中科新闻网 时间:2024/04/29 21:26:17
在 sql Server 中有没有这么一个函数,可以返回查询的结果集中,第一个记录或最后一个记录所返回的字段值。

谢谢
有一个First()和Last() 函数 ,但是不知道为什么SqlServer不支持
谢谢

返回第一条
select top 1 * from 表

返回最后一条
select top 1 * from 表 order by id desc