MySQL saves tables names as lower case
Is it the normal behaviour of MySQL to save table names as lowercase even when I create the tables with CamelCase names? If it is not then how can I make it save the names as CamelCase?
Edit: I am using XAMPP on a machine running Windows 7. Is it a good idea to 开发者_高级运维allow case sensitiive table names? What are the advantages and disadvantages?
See http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html:
From the docs:
In MySQL, databases correspond to directories within the data directory. Each table within a database corresponds to at least one file within the database directory (and possibly more, depending on the storage engine). Consequently, the case sensitivity of the underlying operating system plays a part in the case sensitivity of database and table names. This means database and table names are not case sensitive in Windows, and case sensitive in most varieties of Unix. One notable exception is Mac OS X, which is Unix-based but uses a default file system type (HFS+) that is not case sensitive. However, Mac OS X also supports UFS volumes, which are case sensitive just as on any Unix. See Section 1.8.4, “MySQL Extensions to Standard SQL”. The lower_case_table_names system variable also affects how the server handles identifier case sensitivity, as described later in this section.
精彩评论