I have a table called balance. I want to select from the table where the quantity is not equal to 0. I know I can use the <> operator but during my testing I happened to try the following:
SELECT * FROM BALANCE WHERE QUANTITY < 0 OR QUANTITY > 0;
I expect this to return me all rows where the quantity is not 0 but this wasn't the case I still get 0's. Then I tried:
SELECT * FROM BALANCE WHERE QUANTITY > 0 OR QUANTITY < 0;
I don't get any rows with 0's. This seems as if it is a bug with Sybase SQL Anywhere 10 maybe other versions but I figured I would post this to see if there is something about set logic that I don't understand that would explain my results.