Which is more efficient?
- AND NOT ( lt_title = "ABC" ) AND NOT ( lt_title = "XYZ")
- AND NOT in ( "ABC", "XYZ")
- AND lt_title <> "ABC" AND lt_title <> "XYZ"
Agree that none is ideal.
Which is more efficient?
Agree that none is ideal.
As the first thing, the query engine builds a query plan, then executes the query according to the plan. You can check if the query plan is always the same (e.g., using Toolforge SQL Optimizer). If it is, there is no difference.
I prefer NOT IN
.