[EMAIL PROTECTED] wrote:
I'm a little confused (and fairly new to the list), so please forgive me if
I've got the wrong end of the stick...
So the SQL standard states that NOT has high precedence so
NOT a BETWEEN b AND c
evaluates to
(NOT a) BETWEEN b AND c
(does anyone have a link to the SQL standard?)
I am afraid the SQL standard is not freely available.
I am not sure about the semantics of this without studying the SQL-2003
standard carefully. However, in SQL-92 there were no boolean data types
in SQL, so "(NOT a)" would not make any sense and "NOT a BETWEEN b AND
c" would naturally be interpreted as "NOT (a BETWEEN b AND c)". So, this
is just a problem with "a" being BOOLEAN and "NOT a" being a reasonable
expression.
Being able to specify NOT on a non-boolean expression is a MySQL extension.
Roy
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp