Parenthesized Expressions
Syntax
parenthesized_expression ::= "(" expression
")"
Semantics
Parenthesized expressions are used primarily to alter the default precedence among operators. They are also used as a syntactic aid to mix expressions in ways that would otherwise cause syntactic ambiguities. An example of the later usage is in the definition of the field_step parse rule in the Field Step Expressions section.
Example 6-86 Parenthesized Expression
Select the id and the last name for users whose age is less or equal to 30 and either their age is greater than 20 or their income is greater than 100K.
SELECT id, lastName
FROM users
WHERE (income > 100000 OR 20 < age) AND age <= 30;