Logical Operators
Logical
operators check the truth value of one or more expressions. In SQL
terms, a logical operator checks whether its operands are 0, nonzero,
or NULL. A 0 value means false, nonzero means
true, and NULL means no value.
-
NOTor! Performs a logical
not(returns 1 if the value is 0 orNULL; otherwise, returns 0)-
ORor|| Performs a logical
or(returns 1 if any of the arguments are nonzero and non-NULL; otherwise, returns 0)-
ANDor&& Performs a logical
and(returns 0 if any of the arguments are 0 orNULL; otherwise, returns 1)
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access