I get no results. How can I include a boolean conditional in a where
clause in SQLite?
I have tried these
"Select * from table where col = 1"
"Select * from table where col = '1'"
"Select * from table where col = true"
"Select * from table where col = 'true'"
"Select * from table where col = 'True'"
"Select * from table where col is True"
Nothing. I even tried including "true" as the whereArgs in a query function.
How can I fix it?
SQLite does not have a separate Boolean storage class. Instead, Boolean values are stored as integers 0 (false) and 1 (true).
Source: SQLite
The first one then sounds correct.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With