I have an issue with my select statement; basically, it goes something like
SELECT * FROM table WHERE colA LIKE '%test%' OR colA LIKE '%hold%' AND colb > 1
The colB does not evaluate unless I remove the "OR colA LIKE '%hold%'"
. Wondering how to make the OR apply only to the colA evaluation. I realize I could make OR the last evaluation but wanted to understand how to better work with OR for future sql statements.
It does work if I put OR at end.
SELECT * FROM table WHERE colA LIKE '%test%' OR colA LIKE '%hold%' AND colb > 1
No errors occur; just can't evaluate anything after OR statement and sometimes need to employ OR when using wildcards