NOT Operator Optimizations
Go Up to Understanding SQL Expressions
Starting with InterBase 2020 conditions using
NOT operators have been optimized, a condition like
NOT A>0 can be transformed to
A<=0 so an index on column A can be used.
All inequality operators
<, <=, !=, <>, >, >= can also be transformed and optimized.
NOT conditions can be transformed recursively when possible.
F1 NOT BETWEEN val1 AND val2
F1 < val1 OR F1 > val2