3
关于mysql不区分大小写
source link: https://qidizi.github.io/mysql-case-insensitive/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
注意本前提是在区分大小写的系统做的测试,像centos 7
不区分场景
- sql关键字不区分,如
sElEct 1;
; - 字段,若字段
field_a',使用
select field_A from …`不会出错;
区分的场景
- 库名,如有库
db_a
若使用select * from db_A.table_a limit 1;
就会出错; - 表名,如有表
table_a
,若使用select * from db_A.table_A limit 1;
就会出错; replace
函数,若字段field_a'有值
a,使用
replace(field_a, ‘A’,’1’)`就会返回0个影响行;
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK