On 6 Oct 2017, at 9:12am, Rowan Worth <row...@dug.com> wrote:

> On 6 October 2017 at 15:42, <no...@null.net> wrote:
> 
>> On Fri Oct 06, 2017 at 09:28:08AM +0200, Clemens Ladisch wrote:
>>> 
>>> For boolean values, "a XOR b" = "a <> b".
>> 
>> Is the <> operator documented somewhere? I can't find it in either of
>> these places:
> 
> <> is SQL for "not equal to" (shout out to all the BASIC fans). It’s 
> documented here:
> https://sqlite.org/lang_expr.html#binaryops

That page says that '<>' means 'non-equals'.  This is not the same as the 
binary operation 'XOR' since 'non-equals' can yield only two values: true and 
false.  Experimentation shows …

sqlite> SELECT 11 = 19;
0
sqlite> SELECT 11 <> 19;
1
sqlite> SELECT 11 | 19;
27
sqlite> SELECT 11 & 19;
3

… that even for binary values the documentation is correct and that '<>' does 
not mean 'XOR'.  However, '&' and '|' and '<<' and '>>' do not seem to be 
defined, either there or in

<https://www.sqlite.org/datatype3.html#operators>

I can’t find anywhere in SQLite’s own documentation that defines them.  Perhaps 
this should be remedied.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to