你可能会遇到 sqlite 的类型系统。完整的详细信息在http://www.sqlite.org/datatype3.html上,但相关位是这样的:
A TEXT value is less than a BLOB value
我的猜测是您(有意或无意)将名称列存储为 BLOB 而不是 TEXT。这不是=
文本值,而是LIKE
它。
$ sqlite3
SQLite version 3.7.15 2012-10-15 18:02:57
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table settings (name, value) ;
sqlite> insert into settings values ('MainTabControl.active','textname') ;
sqlite> insert into settings values (cast ('MainTabControl.active' as blob),'blobname') ;
sqlite> select value from settings where name = 'MainTabControl.active' ;
textname
sqlite> select value from settings where name like 'MainTabControl.active' ;
textname
blobname
sqlite> select value, typeof(name) from settings where name like 'MainTabControl.active' ;
textname|text
blobname|blob
sqlite>