SQL查询初学者指南读书笔记(二)创建SQL查询
2015-06-02 11:09
204 查看
PARTII: SQL Basics
CHAPTER 4Creating a Simple Query
介绍一种如何创建SQL语句的技术--“Request/Translation/CleanUp/SQL”
The SELECT operation in SQL can be broken down into three smaller operations,
which we will refer to as the SELECT statement,the SELECT expression,
and the SELECT query.
一层包含一层,相互嵌套使用,可以构成非常复杂的SELECT.
![](http://img.blog.csdn.net/20150602110636828?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc29saWRkcmVhbTY2/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
SELECT Statement的其它关键词都比较熟悉,这儿稍微解释GROUP
BY和H***ING
GROUP BY—When you use aggregate functions in the SELECT clause
to produce summary information, you use the GROUP BY clause to
divide the information into distinct groups.Your database system uses
any column or list of columns following the GROUP BY keywords as
grouping columns.The GROUP BY clause is optional, and we’ll examine
it further in Chapter 13, Grouping Data.
H***ING—The H***ING clause filters the result of aggregate functions
in grouped information. It is similar to the WHERE clause in that the
H***ING keyword is followed by an expression that evaluates to true,
false, or unknown.You can test the expression by using standard comparison
operators, Boolean operators, or special operators. H***ING is
also an optional clause, and we’ll take a closer look at it in Chapter 14,
Filtering Grouped Data.
CHAPTER 4Creating a Simple Query
介绍一种如何创建SQL语句的技术--“Request/Translation/CleanUp/SQL”
The SELECT operation in SQL can be broken down into three smaller operations,
which we will refer to as the SELECT statement,the SELECT expression,
and the SELECT query.
一层包含一层,相互嵌套使用,可以构成非常复杂的SELECT.
SELECT Statement的其它关键词都比较熟悉,这儿稍微解释GROUP
BY和H***ING
GROUP BY—When you use aggregate functions in the SELECT clause
to produce summary information, you use the GROUP BY clause to
divide the information into distinct groups.Your database system uses
any column or list of columns following the GROUP BY keywords as
grouping columns.The GROUP BY clause is optional, and we’ll examine
it further in Chapter 13, Grouping Data.
H***ING—The H***ING clause filters the result of aggregate functions
in grouped information. It is similar to the WHERE clause in that the
H***ING keyword is followed by an expression that evaluates to true,
false, or unknown.You can test the expression by using standard comparison
operators, Boolean operators, or special operators. H***ING is
also an optional clause, and we’ll take a closer look at it in Chapter 14,
Filtering Grouped Data.
相关文章推荐
- 【iOS知识学习】_iOS下SQLite的使用
- mysql四:30多条mysql数据库优化方法,千万级数据库记录查询轻松解决
- MySQL性能优化的21个最佳实践 和 mysql使用索引
- awk取出指定某天的慢日志(mysql)并使用工具分析
- SQL compute by 的使用
- memcached与spring集成
- SQL查询初学者指南读书笔记(一)关系数据库和SQL介绍
- LinQ to SQL==查询
- 通用权限管理设计 之 数据库结构设计
- mybatis执行批量更新batch update 的方法(oracle,mysql)
- sqlplus的非交互式使用
- 分布式MySQL数据库TDSQL架构分析
- mysql二:理解MySQL——索引与优化
- Oracle表分区(经典)
- NoSQL的价值到底在哪里?
- oracle 的rowid和rownum
- 常用 SQL Server 规范集锦
- Mysql的数据类型
- SQL数据库的增删改查
- 分布式MySQL数据库TDSQL架构分析