I just had a need to search a particular string value in 2 columns, so my usual approach is
SELECT ... FROM ...
WHERE (col1 = 'xyz' OR col2 = 'xyz')
But if I had to check multiple values (just for a quick check), say once for 'abc', then 'www', then 'lol', and so on, it is a pain.
So, I tried this and it worked! I never knew this syntax was supported.
SELECT ... FROM ...
WHERE 'xyz' IN (col1, col2)
Is it ok to use this way? I mean are there any caveats?