File tree Expand file tree Collapse file tree 4 files changed +102
-20
lines changed
docs/cn/sql-reference/20-sql-functions Expand file tree Collapse file tree 4 files changed +102
-20
lines changed Original file line number Diff line number Diff line change 1
- Translation initialization: 2025-06-16T03:19:07.622135
1
+ Translation initialization: 2025-06-16T03:44:02.972429
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : bool_and
3
+ ---
4
+ import FunctionDescription from '@site/src /components/FunctionDescription';
5
+
6
+ <FunctionDescription description =" Introduced or updated: v1.2.756 " />
7
+
8
+ 当所有输入值均为 true 时返回 true,否则返回 false。
9
+
10
+ - 忽略 NULL 值。
11
+ - 如果所有输入值均为 null,则结果为 null。
12
+ - 支持布尔类型。
13
+
14
+ ## 语法
15
+
16
+ ``` sql
17
+ bool_and(< expr> )
18
+ ```
19
+
20
+ ## 返回类型
21
+
22
+ 与输入类型相同。
23
+
24
+ ## 示例
25
+
26
+ ``` sql
27
+ select bool_and(t) from (values (true), (true), (null )) a(t);
28
+ ╭───────────────────╮
29
+ │ bool_and(t) │
30
+ │ Nullable(Boolean ) │
31
+ ├───────────────────┤
32
+ │ true │
33
+ ╰───────────────────╯
34
+
35
+ select bool_and(t) from (values (true), (true), (true)) a(t);
36
+
37
+ ╭───────────────────╮
38
+ │ bool_and(t) │
39
+ │ Nullable(Boolean ) │
40
+ ├───────────────────┤
41
+ │ true │
42
+ ╰───────────────────╯
43
+
44
+ select bool_and(t) from (values (true), (true), (false)) a(t);
45
+ ╭───────────────────╮
46
+ │ bool_and(t) │
47
+ │ Nullable(Boolean ) │
48
+ ├───────────────────┤
49
+ │ false │
50
+ ╰───────────────────╯
51
+ ```
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : bool_or
3
+ ---
4
+ import FunctionDescription from '@site/src /components/FunctionDescription';
5
+
6
+ <FunctionDescription description =" 引入或更新于:v1.2.756 " />
7
+
8
+ 如果至少有一个输入值为 true,则返回 true,否则返回 false。
9
+
10
+ - 忽略 NULL 值。
11
+ - 如果所有输入值都为 null,则结果为 null。
12
+ - 支持布尔类型 (boolean)
13
+
14
+ ## 语法
15
+
16
+ ``` sql
17
+ bool_or(< expr> )
18
+ ```
19
+
20
+ ## 返回类型
21
+
22
+ 与输入类型相同。
23
+
24
+ ## 示例
25
+
26
+ ``` sql
27
+ select bool_or(t) from (values (true), (true), (null )) a(t);
28
+ ╭───────────────────╮
29
+ │ bool_or(t) │
30
+ │ Nullable(Boolean ) │
31
+ ├───────────────────┤
32
+ │ true │
33
+ ╰───────────────────╯
34
+
35
+ select bool_or(t) from (values (true), (true), (false)) a(t);
36
+ ╭───────────────────╮
37
+ │ bool_or(t) │
38
+ │ Nullable(Boolean ) │
39
+ ├───────────────────┤
40
+ │ true │
41
+ ╰───────────────────╯
42
+
43
+ select bool_or(t) from (values (false), (false), (false)) a(t);
44
+ ╭───────────────────╮
45
+ │ bool_or(t) │
46
+ │ Nullable(Boolean ) │
47
+ ├───────────────────┤
48
+ │ false │
49
+ ╰───────────────────╯
50
+ ```
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments