I try to get some users which meet certain conditions:
SELECT * FROM users
WHERE lastname IN ('Pitt','Jolie','Costner')
AND firstname IN ('Brad','Angelina','Kevin')
But this way, Kevin Jolie and Brad Costner will be shown, which is NOT what I need.
So I tried:
SELECT * FROM users
WHERE (lastname,firstname) IN ('Pitt','Brad'),('Jolie','Angelina'),('Costner','Kevin')
Which throws the error:
An expression of non-boolean type specified in a context where a condition is expected, near ','.
Do you know a query that will yield my expected result?
Attn: The two or more columns are not always varchar columns, they may be of any type.