我没有得到任何结果。如何在 SQLite 的 where
子句中包含 bool 条件?
这些我都试过了
"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"
没有。我什至尝试将“true”作为查询函数中的 whereArgs。
我该如何解决?
最佳答案
SQLite does not have a separate Boolean storage class. Instead, Boolean values are stored as integers 0 (false) and 1 (true).
来源:SQLite
第一个听起来是正确的。
关于android - 如何在 SQLite WHERE 子句中包含 bool 值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4824687/