What precautions must be taken to use Chinese characters as MySQL table names?
Thanks in advance,
John
SQL supports delimited identifiers to allow table or column names to contain SQL keywords, whitespace, punctuation, other special characters, or international characters.
In MySQL, use back-quotes (or set the ANSI_QUOTES
SQL mode to use standard double-quotes).
Example:
mysql> create table `桌子` (id serial);
mysql> show create table `桌子`\G
--------------
show create table `桌子`
--------------
*************************** 1. row ***************************
Table: 桌子
Create Table: CREATE TABLE `桌子` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With