문제

Is there any way to do an accent-insensitive LIKE query in SQLite? For example, this query:

SELECT * FROM users WHERE name LIKE "Andre%"

would return:

André the Giant
Andre Agassi
etc.

I'm using Qt with QSqlDatabase if it makes any difference.

도움이 되었습니까?

해결책

Set up a collation using sqlite3_create_collation and then use it like this:

SELECT * FROM users WHERE name LIKE "Andre%" COLLATE NOACCENTS
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top