Posted in 1997
On Fri, 3 Oct 1997, Bill Ennis wrote: > What are the order of operations enforced by the Informix SQL > parser with regards to AND/OR in a WHERE clause. Is there a > precedence or is it just left to right? AND takes precedence over OR, but relying on other people to understand this (or yourself, 6 months later) is silly -- use parentheses to make it unambiguous to everybody: Eg: WHERE (x = 1 AND y = 2) OR (x = 3 AND y < 20) WHERE (x = 1 OR y = 2) AND (z = 2 OR z = 15) Etc. Yours, Jonathan Leffler (johnl@informix.com) #include <witticism.h>
We use strictly necessary cookies to make this site work. With your consent we’d also use optional cookies for analytics and marketing. You can accept all, reject all, or choose. Read our Cookie Policy.