


Whenever AND and OR are used together, it is recommended to use parentheses in order to clarify the instruction.
Example of a WHERE condition:
title = 'Comp' AND state = 'TX' OR account > 0.0
If the parentheses are applied in this way:
(title = 'Comp' AND state = 'TX') OR (account > 0.0)
the result consists of all customers who are Texan companies, irrespective of their accounts, plus all customers who have positive accounts. The result of this query is identical to that without parentheses, because AND has a higher precedence than OR.
If the parentheses are set differently:
(title = 'Comp') AND (state = 'TX' OR account > 0.0)
then only 'company' customers are found who are either located in Texas or who have a positive account. Of course, customers who satisfy both conditions - this is, Texan companies with a positive account - are output as well.
Nesting of parentheses is possible. The content of the innermost parentheses is evaluated first.


