mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
fixed the given examples of nullable in zh doc
This commit is contained in:
parent
18a72fa91a
commit
08788e3443
@ -19,37 +19,21 @@
|
||||
|
||||
## 用法示例
|
||||
|
||||
|
||||
```sql
|
||||
CREATE TABLE t_null(x Int8, y Nullable(Int8)) ENGINE TinyLog
|
||||
```
|
||||
:) CREATE TABLE t_null(x Int8, y Nullable(Int8)) ENGINE TinyLog
|
||||
|
||||
CREATE TABLE t_null
|
||||
(
|
||||
x Int8,
|
||||
y Nullable(Int8)
|
||||
)
|
||||
ENGINE = TinyLog
|
||||
|
||||
Ok.
|
||||
|
||||
0 rows in set. Elapsed: 0.012 sec.
|
||||
|
||||
:) INSERT INTO t_null VALUES (1, NULL)
|
||||
|
||||
INSERT INTO t_null VALUES
|
||||
|
||||
Ok.
|
||||
|
||||
1 rows in set. Elapsed: 0.007 sec.
|
||||
|
||||
:) SELECT x + y FROM t_null
|
||||
|
||||
SELECT x + y
|
||||
FROM t_null
|
||||
|
||||
```sql
|
||||
INSERT INTO t_null VALUES (1, NULL), (2, 3)
|
||||
```
|
||||
```sql
|
||||
SELECT x + y FROM t_null
|
||||
```
|
||||
```text
|
||||
┌─plus(x, y)─┐
|
||||
│ ᴺᵁᴸᴸ │
|
||||
│ 5 │
|
||||
└────────────┘
|
||||
|
||||
2 rows in set. Elapsed: 0.144 sec.
|
||||
```
|
||||
|
||||
[来源文章](https://clickhouse.yandex/docs/en/data_types/nullable/) <!--hide-->
|
Loading…
Reference in New Issue
Block a user