sidebar_label: 逻辑函数逻辑函数 {#luo-ji-han-shu}和,AND 运算符 {#and-and-operator}或,OR 运算符 {#or-or-operator}非,NOT 运算符 {#not-not-operator}异或,XOR 运算符 {#xor} slug: /zh/sql-reference/functions/logical-functions sidebar_position: 37 sidebar_label: 逻辑函数逻辑函数 {#luo-ji-han-shu}逻辑函数可以接受任何数字类型的参数,并返回UInt8类型的0或1。 当向函数传递零时,函数将判定为«false»,否则,任何其他非零的值都将被判定为«true»。 和,AND 运算符 {#and-and-operator}或,OR 运算符 {#or-or-operator}非,NOT 运算符 {#not-not-operator}异或,XOR 运算符 {#xor}来源文章