Logical operators define the relationship between two adjacent condition expressions, when multiple expressions are specified.
Logical operators that can be used in condition expressions are listed in the following table.
Logical operator | Logical operation | Explanation |
---|---|---|
AND | AND operation | Links pairs of condition expressions with the AND operator Evaluates to TRUE if the results of both condition expressions is TRUE Evaluates to FALSE if either or both condition expressions are FALSE |
OR | OR operation | Links pairs of condition expressions with the OR operator Evaluates to TRUE if either or both condition expressions are TRUE Evaluates to FALSE if both condition expressions are FALSE |
Point
The AND operator is evaluated first in condition expressions that contains both AND and OR operators.
Use parentheses "()" to change the order of logical operators' evaluation. In the following example, (condition_expression_2 OR condition_expression_3) is evaluated first.
condition_expression_1 AND (condition_expression_2 OR condition_expression_3)
Note
Lower-case "and" and "or" cannot be used as logical operators.