Mysql is case insensitive and mysql is case insensitive
The following table is used to differentiate the sensitivity of mysql to Case sensitivity in windows and linux by default.
Operating System
|
Table Name
|
Variable name
|
Field Value
|
Windows
|
Insensitive
|
Insensitive
|
Insensitive
|
Linux
|
Sensitive
|
Sensitive
|
Sensitive
|
I will not describe it in linux first, because it has not been actually used. The following describes how to modify it in windows:
Alter the case sensitivity of table names:
Lower_case_table_names = 0
0: Case Sensitive, 1: case insensitive
Field Value modification:
1. Set at creation: create table t (
A varchar (10) BINARY );
2. Use alter to modify:
Alter table 'tablename' modify column 'cloname' VARCHAR (45) BINARY;
3. Use Database management tools to modify
Note: you cannot directly change table Collection to bin (utf8_bin if the database character encoding attribute is UTF-8) to make all fields take effect. You must change one field to another.
Why is mysql case-insensitive?
Whether it is case sensitive depends on the checking rules. The default setting is case insensitive.
To be honest, this question and answer are very mysterious.
Mysql field values are case insensitive
This is not necessarily the reason for mysql, simply querying mysql for case-insensitive characters.
If you want to keep it safe, you can use upper or lower to convert the characters in case.