Relational operators

A relational operator makes a comparison, then generates logical results on whether the comparison is true or false. An operand can be checked for null using the special value NULL. $x=NULL is true if $x is null. Relational operators treat null operands according to the NULL substitution principle:

  • If the relation is true regardless of the value of the null operand, the result is true.
  • If the relation is false, the result is false.
  • Otherwise, the result is unknown.