This question already has an answer here:
- selecting where two columns are in a set 2 answers
How to select columns in SQL Server 2008 using WHERE and IN, having 2 columns in the where clause. Here is what I have, however I am getting some error message.
select * from tbl where (col1, col2) in (VALUES ('x1','y1'),('x2','y2'),....);
Msg 4145, Level 15, State 1, Line 2
An expression of non-boolean type specified in a context where a condition is expected, near ','.