0

Is it legit to switch operands in "IN" operator in MySQL? Just like that:

  1. Normal "IN" operator: column_name IN (value1,value2,...)
  2. Perversed "IN" operator: value IN (column_name1,column_name2,...)

...thus effectively replacing multiple "OR" operators.

1 Answers1

0

Yes, you can - just as described in this question: Checking multiple columns for one value (sorry, can't flag question as duplicate, my flag count is over).

Community
  • 1
  • 1
Jehy
  • 4,729
  • 1
  • 38
  • 55