count.md 487 字节
Newer Older
M
Mars Liu 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
# count 练习

Joe 建立了一个名为items的表

```
mysql> select * from items;
+----+-----------+
| id | item      |
+----+-----------+
|  1 |         2 |
|  2 |      NULL |
|  3 |         9 |
|  4 | 534214123 |
+----+-----------+
```

当他执行

```mysql
select count(*), count(item) from items;
```

会得到什么结果?

## 答案

```
3, 4
```

## 选项

### A

```
4, NULL
```

### B

```
3, 3
```

### C

```
1, 0
```

### D

```
NULL,  NULL
```

### E

```
4, 4
```