SQLite 选择带有变音符号的字符串

标签 sqlite select

这是一个简单的问题,但我无法单独解决它,因为我不太熟悉 SQL。

你们中的大多数人可能已经知道这一点,德语中有元音变音字母,例如“ä,Ö,Ü”,小写字母为“ä,ö,ü”。

我正在使用 sqlite 数据库,通过 Firefox 插件“SQLiteManager”访问它。

我的选择语句如下所示:

SELECT * FROM Projects WHERE Token LIKE '%ä%'

Firefox 插件和 .NET 的 SQLite 库都返回错误的输出。它们不仅返回带有小写“ä”的条目,还返回带有大写“ä”的条目。

你们知道解决这个问题的简单方法吗?

最佳答案

documentation说:

SQLite only understands upper/lower case for ASCII characters by default. The LIKE operator is case sensitive by default for unicode characters that are beyond the ASCII range.

但是:

The ICU extension to SQLite includes an enhanced version of the LIKE operator that does case folding across all unicode characters.

关于SQLite 选择带有变音符号的字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34728273/

相关文章:

mysql - 当涉及的所有列都相同且仅 where 条件发生变化时,为什么查询执行速度如此之慢?

mysql - SQL 从多个表中选择 sql-ex 6

c# - x86 DLL 有效但 x64 DLL 无效

c++ - QSqlDatabase 是 exec 阻塞吗?

sqlite - sqlite_sequence 表中的双条目

mysql仅当另一行的字段等于时才选择一行

c# - Entity Framework 对较小的桌面应用程序有意义吗?

c# - 池化的只读 SQLite 连接用于读写访问

Sql select 在表上插入时速度很慢

mysql - 如何在Mysql中从另一个表向表中添加一列?