我有以下sqlite db:
BEGIN TRANSACTION;
CREATE TABLE `table1` (
`Field1` TEXT
);
INSERT INTO `table1` VALUES ('testing');
INSERT INTO `table1` VALUES ('123');
INSERT INTO `table1` VALUES ('87654');
COMMIT;
此选择返回正确的结果:
select * from table1 where Field1 like '%e%';
然而这个没有返回什么?
select * from table1 where Field1 like '%2%';
甚至在SQL浏览器中对SQLite的陌生人:
select * from table1 where CAST(Field1 AS Text) LIKE '%2%'
返回:
1 Rows returned from: select * from table1 where CAST(Field1 AS Text) LIKE '2%' (took %3ms)
也许是个错误?丢掉第一个%
答案 0 :(得分:0)
数据库浏览器中的错误。我提出了一个问题,它现在已在夜间修复了。