SQLite case sensitive search with collate nocase field

人盡茶涼 提交于 2019-12-12 11:43:07

问题


I have a database (which I cant change) that has a collate nocase field:

    name string collate nocase

I need to do a search on this field that is case sensitive. Is this possible with the 'collate nocase'?

Thanks


回答1:


Just switch the collation back for that query:

SELECT * FROM MyTable WHERE name COLLATE BINARY = 'Nick'


来源:https://stackoverflow.com/questions/14947945/sqlite-case-sensitive-search-with-collate-nocase-field

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!