Logical Operators
OpenSQL has three logical operators:
• Not (highest precedence)
• And (next precedence)
• Or (lowest precedence)
Parentheses can be used to change the precedence. For example, assume that the following appears in a query:
exprA or exprB and exprC
OpenSQL evaluates the above as if it were:
exprA or (exprB and exprC)
However, by using parentheses, the order in which OpenSQL evaluates the expressions can be changed. For example:
(exprA or exprB) and exprC
When parenthesized as shown, (exprA or exprB) is evaluated first, then the operator is used for that result with exprC.
Last modified date: 08/29/2024