Du kan komprimera den (lite) med:
SELECT * --- irrelevant to the question:
FROM table1 JOIN table2 --- use the explicit JOIN syntax
ON table1.id1 = table2.id2 --- not the implicit join with the
---table1,table2 where table1.id1 = table2.id2 --- WHERE syntax (removed)
WHERE
--- filters
AND (table1.col2, table2.col2) IN
( ('value_11', 'value_21'),
('value_12', 'value_22'),
('value_13', 'value_23'),
...
(value_1100, value_2200)
)
Om du har dessa filtervillkor i en tabell kan du till och med göra det:
AND (table1.col2, table2.col2) IN
( SELECT filter1, filter2
FROM filter_table
)