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.

Clemens said "For boolean values" So if a and b are limited to the values 0 & 1 
not equals is the same as XOR.

sqlite> SELECT 0 <> 0;
0
sqlite> SELECT 0 <> 1;
1
sqlite> SELECT 1 <> 0;
1
sqlite> SELECT 1 <> 1;
0

Andy Ling

 
---------------------------------------------------------------------------------------
This email has been scanned for email related threats and delivered safely by 
Mimecast.
For more information please visit http://www.mimecast.com
---------------------------------------------------------------------------------------

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

Reply via email to