SQLite Forum

Bug when converting string to boolean?
Login
There is a difference between ISing and ==ing.

TRUE == 1 and FALSE == 0 but any number not 0 or NULL IS TRUE while 0 IS FALSE, and NULL IS neither TRUE nor FALSE but rather is NULL whether by ISing or ==ing.

```
SQLite version 3.32.0 2020-05-24 12:57:56
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> select 5 == true;
0
sqlite> select 5 is true;
1
```

There is a big difference between BEING (IS) something and being EQUAL (==) to something.