开发者

MySQL naming in PHPmyAdmin

开发者 https://www.devze.com 2023-01-15 02:28 出处:网络
How do you rename a MySQL table in PHPMyAdmin?(SQL command?) Are MySQL table names case-sensitive when working wi开发者_StackOverflowth PHP?Hit the Operations tab when browsing a table to rename it.

How do you rename a MySQL table in PHPMyAdmin? (SQL command?)

Are MySQL table names case-sensitive when working wi开发者_StackOverflowth PHP?


Hit the Operations tab when browsing a table to rename it. Names are case-sensitive in Linux, insensitive in Windows.


You can use the RENAME TABLE syntax:

RENAME TABLE old_name TO new_name

...but the caveat is that no one can be accessing the table when you execute the statement.

Case sensitivity is dependent on the collation - collations ending with "_ci" means "Case Insensitive". The client, in your case PHPMyAdmin, can have it's collation which is different from the MySQL instance's collation... and tables can have their own collation. See the MySQL Collation documentation for more info.


The table name case sensitivity is controlled by lower_case_table_names server variable:

http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_lower_case_table_names


In phpMyAdmin all you need to do is click on the table, and then click on the 'Operations' tab. Once there, you will see 'Rename Table To'. Change this field and your should be good to go.

0

精彩评论

暂无评论...
验证码 换一张
取 消