Just curious about the IN statement in SQL. I know I can search multiple columns with one value by doing
'val1' IN (col1,col2)
And can search a column for multiple values
col1 IN ('val1','val2')
But is there a way to do both of these simultaneously, without restorting to an repeating AND / OR in the SQl? I am looking to do this in the most scalable way, so independent of how many vals / cols i need to search in. So essentially:
('val1','val2') IN (col1,col2)
but valid.
AND/OR
logic, there is no way to avoid comparing each value in the first set to each value in the second so performance wise it would be equivalent.