Boolean in WHERE clauses

Boolean values are stored as 0 for false or 1 for true. To limit search results to objects for which a specific property of the data type Boolean is either false or true, you can use any of the following WHERE conditions:

For property = true For property = false
  • WHERE ClassName.PropertyName = 1
  • WHERE ClassName.PropertyName = true
  • WHERE ClassName.PropertyName = True
  • WHERE ClassName.PropertyName = 0
  • WHERE ClassName.PropertyName = false
  • WHERE ClassName.PropertyName = False

Please note that properties of the data type boolean can have three values:

In the Alfabet query language, a property that is Null, that means not set, is regarded as set to false and included into the results accordingly.