发现一个sql 查询的问题
friend表中 字段名为 isBother
sqlite是忽略大小写的
查询的时候如果这样写查询条件 friends.isbother=1,从curcor 中取值的时候 必须这样写cursor.getColumnIndex("isbother") ,这样写cursor.getColumnIndex("isBother") 是取不到的,而如果 你使用 select * 查询,必须写成cursor.getColumnIndex("isBother")
关于sqlite查询cursor取值的问题
最新推荐文章于 2023-07-08 09:44:58 发布
探讨了在使用SQLite数据库时,字段名大小写敏感性的问题。特别指出在friend表中查询isBother字段时,查询条件和getColumnIndex方法调用中字段名大小写的一致性至关重要。
AI 时代程序员必备技能
Codex、Claude Code、Cursor、Hermes Agent、OpenClaw等工程化实战专栏 ,讲透 AI 如何接管脏活累活
AI 时代程序员必备技能
Codex、Claude Code、Cursor、Hermes Agent、OpenClaw等工程化实战专栏 ,讲透 AI 如何接管脏活累活

1430

被折叠的 条评论
为什么被折叠?



