MySQL: Can't give tables a name in Upper Camel Case (Pascal Case)

倾然丶 夕夏残阳落幕 提交于 2019-11-30 23:15:29

I advice against mixed case because of problems with case sensitivity. A fully tested solution on one platform where case doesn't matter may actually fail when deployed on a platform where case DOES matter. For that reason alone I suggest sticking with either all caps or all lower case. I use lower case because it is easier on the eye and make spelling errors easier to spot in fixed width fonts used in most editors.

The easiest way to take care of this is to add the following to your .ini file

lower_case_table_names=2

2 is the significance here for Windows. You can read more about it here Identifier Case Sensitivity

Use RENAME

example:

RENAME TABLE this_is_my_table_name TO ThisIsMyTableName;

details : http://dev.mysql.com/doc/refman/5.1/en/rename-table.html

In MySQL, you can quote the table names everywhere to make them case preserving and sensitive.

`MyTableName`
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!