【译文】对结果记录集进行排序(三)
时 间:2014-03-17 09:14:21
作 者:周芳 ID:24526 城市:上海
摘 要:对结果记录集进行排序
正 文:
来自:微软 翻译:周芳
【原文】对结果记录集进行排序(三)
要指定一个特定的一个或多个字段排序顺序的结果集,可以使用可选的order BY子句。记录可以按照升序(ASC)或降序(DESC)排序,默认为升序。
orDER BY子句中引用字段不需要Select语句的字段列表,和排序可以应用到字符串、数字、日期/时间值。总是BYclause订货在Select语句的结束。
VBA
Select *
FROM tblCustomers
orDER BY [Last Name], [First Name] DESC
在ORDER BY子句中,您还可以使用数字(或位置)代替字段名称。
VBA
Select *
FROM tblCustomers
orDER BY 2, 3 DESC
【译文】Sorting the Result Set
To specify a particular sort order on one or more fields in the result set, use the optional orDER BY clause. Records can be sorted in either ascending (ASC) or descending (DESC) order; ascending is the default.
Fields referenced in the orDER BY clause do not have to be part of the Select statement's field list, and sorting can be applied to string, numeric, and date/time values. Always place the orDER BYclause at the end of the Select statement.
VBA
Select *
FROM tblCustomers
orDER BY [Last Name], [First Name] DESC
You can also use the field numbers (or positions) instead of field names in the orDER BY clause.
VBA
Select *
FROM tblCustomers
orDER BY 2, 3 DESC
Access软件网官方交流QQ群 (群号:54525238) Access源码网店
常见问答:
技术分类:
源码示例
- 【源码QQ群号19834647...(12.17)
- 统计当月之前(不含当月)的记录...(03.11)
- 【Access Inputbo...(03.03)
- 按回车键后光标移动到下一条记录...(02.12)
- 【Access Dsum示例】...(02.07)
- Access对子窗体的数据进行...(02.05)
- 【Access高效办公】上月累...(01.09)
- 【Access高效办公】上月累...(01.06)
- 【Access Inputbo...(12.23)
- 【Access Dsum示例】...(12.16)

学习心得
最新文章
- 32位的Access软件转化为64...(04.12)
- 【Access高效办公】如何让vb...(04.11)
- 仓库管理实战课程(10)-入库功能...(04.08)
- Access快速开发平台--Fun...(04.07)
- 仓库管理实战课程(9)-开发往来单...(04.02)
- 仓库管理实战课程(8)-商品信息功...(04.01)
- 仓库管理实战课程(7)-链接表(03.31)
- 仓库管理实战课程(6)-创建查询(03.29)
- 仓库管理实战课程(5)-字段属性(03.27)
- 设备装配出入库管理系统;基于Acc...(03.24)