auto commit

This commit is contained in:
CyC2018
2019-05-21 11:01:42 +08:00
parent 43a56c1294
commit 4119a19b17
8 changed files with 80 additions and 38 deletions

View File

@ -118,6 +118,13 @@ VALUES
## Solution
使用异或操作,两个相等的数异或的结果为 0而 0 与任何一个数异或的结果为这个数。
```
'f' ^ 'm' ^ 'f' = 'm'
'm' ^ 'm' ^ 'f' = 'f'
```
```sql
UPDATE salary
SET sex = CHAR ( ASCII(sex) ^ ASCII( 'm' ) ^ ASCII( 'f' ) );
@ -237,6 +244,8 @@ VALUES
## Solution
对 class 列进行分组之后,再使用 count 汇总函数统计数量,统计之后使用 having 进行过滤。
```sql
SELECT
class