How does SQL engines differ when we use equal sign and IN operator have same value? Does execution time changes?
1st one using equality check operator
WHERE column_value = 'All'
WHERE column_value IN ('All')
There is no difference between those two statements, and the optimiser will transform the
IN to the
IN have just one element in it.
Though when you have a question like this, just run both statements, run their execution plan and see the differences. Here - you won't find any.
After a big search online, I found a document on SQL to support this(I assume it applies to all DBMS):
If there is only one value inside the parenthesis, this commend is equivalent to
WHERE "column_name" = 'value1