mysql中大小写敏感么?

来源:互联网 发布:同轴电缆传输网络结构 编辑:程序博客网 时间:2024/04/30 14:07

关于myslq中大小写敏感的问题,

MySQL数据库名和表名的大小写敏感说明:MySQL中的数据库名和表名和操作系统有关,在windows操作系统中,不区分大小写,在unix ,linux操作系统中,是区分大小写的。其实可以到mysql存放数据的data目录下进行查看,可以知道其实一个数据库是对应表,一张表是对应一个表名+".frm"的文件 。

由于在windows操作系统中,文件名和目录名是不区分大小写的,

所以MySQL数据库名和表名在windows下是大小写不敏感的,而unix,linux则不然。

下面是MySQLmanual原文说明:

In MySQL, databases and tables correspond to directories and files within those directories.
Consequently, the case sensitivity of the underlying operating system determines the case
sensitivity of database and table names. This means database and table names are case
sensitive in Unix and case insensitive in Windows.

列名的大小写说明:

在mysql中,列名是大小写不敏感的,也就是说”testColumn“和"TESTCOLUMN"是一样的。

原创粉丝点击