"Thomas Sundberg" <[EMAIL PROTECTED]> wrote on 04/02/2005
13:48:03:
> It is very simple but absolutely not straight forward. It really doesn't
say
> anything. Just that you should do things right and then you will not
have
> any problems.
> The concrete problem I tried to solve were if MySQL supports xor in a
where
> clause. And if so, how should the syntax be written? That would have
been
> extremely simple if the syntax diagram started just above the quote you
> supplied us with had been completed and not ended when things got a bit
> interesting.
It would probably not have been very hepful because it would simply have
mentioned <operators> and referred you back to section 12 of the manual
for a complete (and growing) list of operators. Good database practice
suggests that the same data - the list of valid operators - should not be
in two places unless there is an aoutomated method of deriveing the lesser
from the greater.. The "master" copy is the list of operators in the
Syntax section of the manual. Since operators includes words like IN, AND,
NOT, the syntax of operators is roughly [<non-space-character>]* . If you
looked in the manuel, under operators, then bitwise operators, you would
find xor near the top of the table - togehter with the information (not
available in a syntax diagram) that it is only available since 4.0.2.
Alternatively , a second's experimentation (SELECT 5^1;) would have shown
that it has the "obvious" syntax - or the alternative syntax (SELECT 5 XOR
1;) ;
Alec Cawley
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]