博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SQL查询初学者指南读书笔记(二)创建SQL查询
阅读量:4120 次
发布时间:2019-05-25

本文共 1165 字,大约阅读时间需要 3 分钟。

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.

 

 

 

SELECT Statement的其它关键词都比较熟悉,这儿稍微解释GROUP BYHAVING

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.

 

HAVING—The HAVING clause filters the result of aggregate functions

in grouped information. It is similar to the WHERE clause in that the

HAVING 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. HAVING is

also an optional clause, and we’ll take a closer look at it in Chapter 14,

Filtering Grouped Data.

你可能感兴趣的文章
C 语言 学习---判断文本框取得的数是否是整数
查看>>
C 语言 学习---ComboBox相关、简单计算器
查看>>
C 语言 学习---ComboBox相关、简易“假”管理系统
查看>>
C 语言 学习---回调、时间定时更新程序
查看>>
C 语言 学习---复选框及列表框的使用
查看>>
第四章 - 程序计数器
查看>>
第七章 - 本地方法栈
查看>>
第十一章 - 直接内存
查看>>
JDBC核心技术 - 上篇
查看>>
JDBC核心技术 - 下篇
查看>>
一篇搞懂Java反射机制
查看>>
【2021-MOOC-浙江大学-陈越、何钦铭-数据结构】树
查看>>
MySQL主从复制不一致的原因以及解决方法
查看>>
RedisTemplate的key默认序列化器问题
查看>>
序列化与自定义序列化
查看>>
ThreadLocal
查看>>
从Executor接口设计看设计模式之最少知识法则
查看>>
OKhttp之Call接口
查看>>
application/x-www-form-urlencoded、multipart/form-data、text/plain
查看>>
关于Content-Length
查看>>