
Untitled
By: a guest on
Jul 15th, 2012 | syntax:
None | size: 0.45 KB | hits: 11 | expires: Never
Is there a difference between these two queries?
SELECT * FROM table WHERE column1 = 'x' OR column2 = 'x'
SELECT * FROM table WHERE (column1 = 'x' OR column2 = 'x')
SELECT * FROM table WHERE id=1 AND column1 = 'x' OR column2 = 'x'
SELECT * FROM table WHERE id=1 AND (column1 = 'x' OR column2 = 'x')
SELECT * FROM table WHERE id=1 AND column1 = 'x' OR column2 = 'x'
SELECT * FROM table WHERE (id=1 AND column1 = 'x') OR column2 = 'x'