Predicates
The standard comparators are available:
expr1 < expr2(less than)expr1 <= expr2(less than or equal to)expr1 > expr2(greater than)expr1 >= expr2(greater than or equal to)expr1 = expr2(equal to)expr1 <> expr2|expr1 != expr2(not equal to)
Greatest / Least
Section titled “Greatest / Least”These aren’t strictly predicates - they return the greatest/least value of their arguments respectively:
GREATEST(expr, ...)- returns the greatest value of the provided arguments, by the usual comparison operators
LEAST(expr, ...)- returns the least value of the provided arguments, by the usual comparison operators
Boolean functions
Section titled “Boolean functions”expr1 AND expr2- returns true if both
expr1andexpr2are true, false otherwise expr1 OR expr2- returns true if either
expr1orexpr2are true, false otherwise NOT expr- returns true if
expris false, false otherwise expr IS [NOT] TRUE- returns true if
expris [not] true, false otherwise (including ifexpris null) expr IS [NOT] FALSE- returns true if
expris [not] false, false otherwise (including ifexpris null) expr IS [NOT] NULL- returns true if
expris [not] null, false otherwise