Re: Bug in SQLite version 3.31.1 and 3.32?

Simon Slavin <[email protected]> Sat, 7 Mar 2020 02:00:55 +0000
Newsgroups gmane.comp.db.sqlite.general
Message-ID <[email protected]>
On 7 Mar 2020, at 1:52am, Xinyue Chen <[email protected]> wrote:

> If I change IS NOT FALSE to IS TRUE, the results will be different. I
> assume they should perform in the same way?

No.  Because NULL is not TRUE and is not FALSE.

SQLite version 3.28.0 2019-04-15 14:49:49
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> SELECT NULL IS TRUE;
0
sqlite> SELECT NULL IS FALSE;
0
sqlite> SELECT NULL IS NOT TRUE;
1
sqlite> SELECT NULL IS NOT FALSE;
1

Once you can have NULL values, you have to know the rules very well when you apply logic.  Other values make sense, but NULL is not logical.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users