【发布时间】:2018-05-13 13:32:31
【问题描述】:
我知道 mysql 查询区分大小写。但在我的一个数据库中,它不区分大小写。以下两个查询都给出相同的结果
Select username from auth_user where username='shivam'
和
Select username from auth_user where username='ShivaM'
我在我的 django 项目中使用了这个数据库,我通常使用 icontains 和 iexact 查找不区分大小写的查询,但我无法找出上述行为的原因。
【问题讨论】:
-
你需要用
SHOW CREATE TABLE auth_user检查数据库字符集排序或colomn字符集排序