如何在SQLite WHERE子句中包含布尔值

Jon*_* S. 11 sqlite android

我没有结果.如何where在SQLite 中的子句中包含布尔条件?

我试过这些

"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"
Run Code Online (Sandbox Code Playgroud)

没有.我甚至尝试在查询函数中包含"true"作为whereArgs.

我该如何解决?

sep*_*010 16

SQLite没有单独的布尔存储类.相反,布尔值存储为整数0(假)和1(真).

资料来源:SQLite

然后第一个听起来是正确的.