Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要一个标准的 sqlite 查询命令来查找以大写字母开头的“表”列中的所有“含义”。我的表结构是,
table1 = <id, entry, meaning, pos, category>
我的数据库是一个 sqlite 数据库。
我有一个解决方案,
SELECT * FROM table1 WHERE substr(meaning,1,1) = upper(substr(meaning,1,1));
另一种解决方案,
SELECT * FROM table1 WHERE substr(meaning,1,1) between "A" and "Z"
使用GLOB 运算符:
SELECT * FROM table1 WHERE meaning GLOB '[A-Z]*'
(这将允许 SQLite 在列上使用索引。)