On 25 Jun 2017, at 7:59pm, J Decker <[email protected]> wrote:
> SQL Standard > http://web.cecs.pdx.edu/~len/sql1999.pdf > doesn't seem to have math operators... and the precedence tables are > described in longhand without a simple table.... > DateTimes have math operators > > "Operations on numbers are performed according to the normal rules of > arithmetic, within implementation-defined limits, except as provided for in > Subclause 6.26, ‘‘’’." Which comes from SQL-92 which comes from SQL-89, almost unchanged. However, & and | were not considered numeric operators at that point, so they didn’t figure into statements about the precedence of numeric operators. BIDMAS (excuse me, I’m British) does apply, and it’s implemented in SQLite. Of course, bitwise operators don’t feature in it because BIDMAS is for numbers and not bitwise operators. My personal answer to the original question is "history". C wasn’t the huge juggernaut back in 1989 that it is now. A programmer could work their whole life without seeing a line of C code. So there was no instinct to build C rules into everything else. Simon. _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

