Does the SQL query
SELECT * FROM table_a where cond1 or cond2 and cond3;
deliver the same result as
SELECT * FROM table_a where (cond1 or cond2) and cond3;
?
Does the SQL query
SELECT * FROM table_a where cond1 or cond2 and cond3;
deliver the same result as
SELECT * FROM table_a where (cond1 or cond2) and cond3;
?
No. Boolean operators have precedence rules -- in all programming languages that use them and in mathematics before that. "AND" binds more closely than "OR". This is analogous to arithmetic operators.
Just as:
1 + 2 * 3
is different from:
(1 + 2) * 3
Your two versions are different. AND binds more tightly (like *). OR less tightly (like +).