SQLite Forum

When is "IS" used in SQLite?
Login
>you make false claims

No. You are not taking implicit type casting into account. Let's make your query more explicit:

```
sqlite>select 5 = cast(true as int) as "==", cast(5 as boolean) is true as " is ";

==          cast(5 as boolean) is true
----------  --------------------------
0           1
```

From [SQLite's manual](https://www.sqlite.org/lang_expr.html):

>The boolean identifiers TRUE and FALSE are usually just aliases for the integer values 1 and 0, respectively. However, if TRUE or FALSE occur on the right-hand side of an IS operator, then they form new unary postfix operators "IS TRUE" and "IS FALSE" which test the boolean value of the operand on the left.

So, `5 = true` is the same as `5 = 1`, and `5 is true` is the same as `true is true`.