From 08788e344372995eedc731560f9b57798f7af06f Mon Sep 17 00:00:00 2001 From: rainbowsysu Date: Thu, 24 Oct 2019 20:07:10 +0800 Subject: [PATCH] fixed the given examples of nullable in zh doc --- docs/zh/data_types/nullable.md | 40 ++++++++++------------------------ 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/docs/zh/data_types/nullable.md b/docs/zh/data_types/nullable.md index 41565f9d721..67d98fa9408 100644 --- a/docs/zh/data_types/nullable.md +++ b/docs/zh/data_types/nullable.md @@ -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/) \ No newline at end of file