I am working on a way to delete multiple rows of a single SQL database, targeting two columns. ColumnA will always be the same value, and ColumnB will be different values.
I am trying to figure out the correct syntax for something like this:
DELETE FROM tableName WHERE (
ColumnA = 123 AND ColumnB = 1,
ColumnA = 123 AND ColumnB = 2,
ColumnA = 123 AND ColumnB = 3,
ColumnA = 123 AND ColumnB = 4,
ColumnA = 123 AND ColumnB = 8
);
What will be the correct SQL syntax for the above logic?
ORs.ANDs are interpreted beforeORs already: dev.mysql.com/doc/refman/8.0/en/operator-precedence.html