mysql创建一个表字符集

时间:2011-01-25 10:39:01

标签: php mysql phpmyadmin

在phpmyadmin中,我输入了:

CREATE TABLE ch
 ucs2 CHAR(3) CHARACTER SET ucs2,
 gb2312 CHAR(3) CHARACTER SET gb2312
 test3 CHAR(4) CHARACTER SET utf8;

它给了我一个语法错误。我在这里做错了什么?

1 个答案:

答案 0 :(得分:2)

你忘了括号:

CREATE TABLE ch(
 ucs2 CHAR(3) CHARACTER SET ucs2,
 gb2312 CHAR(3) CHARACTER SET gb2312,
 test3 CHAR(4) CHARACTER SET utf8
);