When an expression involves more than one operator, the order in which the expression is evaluated might affect the result. Consider the following example:
SET a = b + c * d;
Under ESQL's precedence rules, c is multiplied by d and the result is added to b. This rule states that multiplication takes precedence over addition, so reordering the expression as follows:
SET a = c * d + b;
makes no difference. ESQL's precedence rules are set out below but it is generally considered good practice to use parentheses to make the meaning clear. The order of precedence is:
Operations at the same level are evaluated from left to right.