Home  >  Article  >  Database  >  限定查询与排序显示(章节摘要)

限定查询与排序显示(章节摘要)

WBOY
WBOYOriginal
2016-06-07 15:59:17952browse

1,数据查询的标准语法。 SELECT [DISTINCT] * | 列 [AS][别名],列[AS][别名],... FROM 表名称 [别名] [WHERE 限定条件(s)] [ORDER BY 排序字段 [ASC | DESC][,排序字段[ASC | DESC]...]]; 2,多个字句的执行顺序为FROM,WHERE,SELECT,ORDER BY,其中ORDER BY

1,数据查询的标准语法。

SELECT [DISTINCT] * | 列 [AS][别名],列[AS][别名],...
FROM 表名称 [别名]
[WHERE 限定条件(s)]
[ORDER BY 排序字段 [ASC | DESC][,排序字段[ASC | DESC]...]];

2,多个字句的执行顺序为FROM,WHERE,SELECT,ORDER BY,其中ORDER BY字句永远放在最后执行。

3,在使用限定查询时,所讲解的若干个限定条件为关系运算,逻辑运算,BETWEEN...AND,LIKE,IN,NULL。

4,使用ORDER BY字句可以对查询结果进行排序,ORDER BY子句一定要卸载所有查询字句的最后。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn