SELECT * FROM tbl WHERE ckField <> 0;
Boolean logic is not intuitive and can also vary across systems.Boolean logic is Boolean logic. It does not vary across systems. But Boolean logic does not consider null and the treatment of null does vary.
I've had enough occasions that testing for the positive has failed me that I much prefer exclusion of the negative as the alternative.Apparently I live in a different dimension.
Boolean algebra is the subarea of algebra in which the values of the variables are the truth values true and false, usually denoted 1 and 0 respectivelyThe papers on Boolean logic do not address the null. They discuss true/false and the various relational operators. The null is a relational database concept and each RDBMS may handle it differently.
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
18 Experts available now in Live!