ClickHouse/docs/zh/sql-reference/functions/logical-functions.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
626 B
Markdown
Raw Normal View History

2020-06-08 05:29:08 +00:00
---
2022-08-26 19:07:59 +00:00
slug: /zh/sql-reference/functions/logical-functions
2022-04-10 23:08:18 +00:00
sidebar_position: 37
sidebar_label: 逻辑函数
2020-06-08 05:29:08 +00:00
---
# 逻辑函数 {#luo-ji-han-shu}
2019-05-05 17:38:05 +00:00
逻辑函数可以接受任何数字类型的参数并返回UInt8类型的0或1。
当向函数传递零时函数将判定为«false»否则任何其他非零的值都将被判定为«true»。
2019-05-05 17:38:05 +00:00
2020-06-08 05:29:08 +00:00
## 和,`AND` 运算符 {#and-and-operator}
2019-05-05 17:38:05 +00:00
2020-06-08 05:29:08 +00:00
## 或,`OR` 运算符 {#or-or-operator}
2019-05-05 17:38:05 +00:00
2020-06-08 05:29:08 +00:00
## 非,`NOT` 运算符 {#not-not-operator}
2019-05-05 17:38:05 +00:00
2020-06-08 05:29:08 +00:00
## 异或,`XOR` 运算符 {#xor}
2019-05-05 17:38:05 +00:00
[来源文章](https://clickhouse.com/docs/en/query_language/functions/logical_functions/) <!--hide-->