On Thursday, 5 July, 2018 00:57, Donald Shepherd <donald.sheph...@gmail.com>:
>On Thu, 5 Jul 2018 at 16:45, Simon Slavin <slav...@bigfraud.org> >wrote:
>> On 5 Jul 2018, at 7:30am, Clemens Ladisch <clem...@ladisch.de> >wrote:

>>> The expression "x = x" will fail for NULL, but succeed for
>>> everything else.  So you can use that to implement a 
>>> "not-NULL ELSE"

>> Wow.  That has to be the most counter-intuitive feature of SQLite.

>> I understand why it works, but I still don't like it.  Thanks for
>> posting it.

>> Hmm.  Yes, "x != x" works too.  I forgot to check "x IS NOT x".

> I've always thought of that as an SQL thing rather than an SQLite
> thing, because SQL Server and PostgreSQL and MySQL all do the same 
> (or at least so I'm lead to believe in the last two cases).

It is a mathematics thing.  The NULL value works like that everywhere.  Unless 
the coder/programmer made a boo-boo.

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.




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

Reply via email to