I want to delete 2 distict rows, but with simular data. 3 colums, 1 is unique, and the other 2 are switched around. I was using something like this but it only delete 1.
DELETE FROM Table
WHERE Column1 = 'a' AND Column2 = 'b'
OR column1 = 'b' AND Column2 = 'a'
This only deleted one column the statement. Thanks for any help
In SQL
ANDtakes preference overOR.Your
whereclause is interpreted asThis is quite likely not what you want and you should (almost) always put the OR’ed tests in parenthesis like so:
See: http://dev.mysql.com/doc/refman/5.0/en/operator-precedence.html