lamborghini
IS-IT--Management
Hi there,
I am trying create a database and some tables, it is required to support multi-language in the table, i.e. Chinese and english, I tried the following way, but it has error, could you please share your ideas with me?
*********************************************************
CREATE DATABASE IF NOT EXISTS user DEFAULT CHARACTER SET gb2312 COLLATE gb2312_chinese_ci;
use user;
DROP TABLE IF EXISTS password;
CREATE TABLE password (
customerid CHAR(20) NOT NULL,
password CHAR(50) UNICODE,
role CHAR(10) DEFAULT 'customer',
PRIMARY KEY (customerid)
);
No problem to create db and table, but if has the following error when I type in some Chinese character.
ERROR 1266: Illegal mix of collations (gb2312_chinese_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
I am trying create a database and some tables, it is required to support multi-language in the table, i.e. Chinese and english, I tried the following way, but it has error, could you please share your ideas with me?
*********************************************************
CREATE DATABASE IF NOT EXISTS user DEFAULT CHARACTER SET gb2312 COLLATE gb2312_chinese_ci;
use user;
DROP TABLE IF EXISTS password;
CREATE TABLE password (
customerid CHAR(20) NOT NULL,
password CHAR(50) UNICODE,
role CHAR(10) DEFAULT 'customer',
PRIMARY KEY (customerid)
);
No problem to create db and table, but if has the following error when I type in some Chinese character.
ERROR 1266: Illegal mix of collations (gb2312_chinese_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='