你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

The bool data type

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

The bool data type can be: true (1), false (0), or null.

The bool and boolean data types are equivalent.

bool literals

To specify a bool literal, use one of the following syntax options:

Syntax Description
true or bool(true) Represents trueness.
false or bool(false) Represents falsehood.
bool(null) Represents the null value.

Learn more about syntax conventions.

Boolean operators

The bool data type supports all of the logical operators: equality (==), inequality (!=), logical-and (and), and logical-or (or).