Does it make much difference if I use in either of the following in a WHERE
clause:
WHERE [Process Code] = 1 AND ([Material ID] = 'PLT' OR [Material ID] = 'BMI')
--or
WHERE [Process Code] = 1 AND [Material ID] IN ('PLT', 'BMI')
Would there be a time I would use one instead of the other?
I can't think of a time I would use the first option. The second option is much cleaner and more expressive. And if it ever needs to be converted into a sub-select, it'll be easier to do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With