2020-04-03 13:23:32 +00:00
|
|
|
---
|
|
|
|
toc_priority: 37
|
|
|
|
toc_title: Logical
|
|
|
|
---
|
|
|
|
|
2020-03-20 10:10:48 +00:00
|
|
|
# Logical functions {#logical-functions}
|
2017-12-28 15:13:23 +00:00
|
|
|
|
|
|
|
Logical functions accept any numeric types, but return a UInt8 number equal to 0 or 1.
|
|
|
|
|
2020-03-20 10:10:48 +00:00
|
|
|
Zero as an argument is considered “false,” while any non-zero value is considered “true”.
|
2017-12-28 15:13:23 +00:00
|
|
|
|
2020-03-20 10:10:48 +00:00
|
|
|
## and, AND operator {#and-and-operator}
|
2017-12-28 15:13:23 +00:00
|
|
|
|
2020-03-20 10:10:48 +00:00
|
|
|
## or, OR operator {#or-or-operator}
|
2017-12-28 15:13:23 +00:00
|
|
|
|
2020-03-20 10:10:48 +00:00
|
|
|
## not, NOT operator {#not-not-operator}
|
2018-04-23 06:20:21 +00:00
|
|
|
|
2020-03-20 10:10:48 +00:00
|
|
|
## xor {#xor}
|
2018-10-16 10:47:17 +00:00
|
|
|
|
2020-01-30 10:34:55 +00:00
|
|
|
[Original article](https://clickhouse.tech/docs/en/query_language/functions/logical_functions/) <!--hide-->
|