mysql 数据库大小写敏感(数据库的名字、表名字、字段名字、字段值)

1)
http://blog.csdn.net/wyzxg/article/details/44236259 重要,区分大小写敏感的概念
http://www.2cto.com/database/201503/386261.html


在oracle中一般情况下不区分大小写。有时候我们在使用oracle不注意大小写的问题,表名和字段名不加双引号是不区分大小写的,像这样:insert into tableName 和 insert into TABLENAME效果是一样的,用工具导出创建/数据初始化脚本,得到的结果一般表名和字段名转化成了大写。
但在MySQL中,所使用操作系统的大小写敏感性决定了数据库名和表名的大小写敏感性。数据库对应数据目录中的目录,数据库中的每个表至少对应数据库目录中的一个文件(也可能是多个,取决于存储引擎)。因此,使用数据库或表实际上是操纵这些文件(夹),所以使用操作系统的大小写敏感性决定了数据库名和表名的大小写敏感性。在以linux为内核的操作系统中是大小写敏感的。
http://server.51cto.com/Soft-54983.htm  好

3)
字段值的大小写敏感,由字符集影响 http://blog.csdn.net/steveguoshao/article/details/37531265
创建时 指定字符集 create database yutest default character set utf8 collate utf8_bin;
http://www.jb51.net/article/41546.htm
修改字符集 alter table usertest modify username varchar(32) binary;
查询  select * from usertest where username like binary  '%夏%'
http://www.linuxidc.com/Linux/2014-06/102870.htm
http://blog.csdn.net/sunlylorn/article/details/6122259
CHAR VARCHAR:值根据缺省字符集以大小写不区分的方式排序和比较,除非给出BINARY关键词。

http://www.2cto.com/database/201503/386261.html
http://my.oschina.net/adwangxiao/blog/77093
http://www.jb51.net/article/41546.htm
http://www.111cn.net/database/mysql/51923.htm
http://www.cnblogs.com/wzmenjoy/p/4244545.html
4)
show variables like '%case%';
show variables like '%collation%';
show variables like '%character%';

5)MySQL查询字符串时区分大小写
http://www.zuimoban.com/php/other/1543.html

猜你喜欢

转载自jackleechina.iteye.com/blog/2276874