mysql 处理中文乱码问题
CREATE TABLE tbl_score( `ID` INT NOT NULL, `score` DEC(6,2) NOT NULL, `subject` VARCHAR(20) NOT NULL ); INSERT INTO tbl_score (ID, score, `subject`) VALUES (1, 90, '语文'); INSERT INTO tbl_score (ID, score, `subject`) VALUES (1, 80, '数学'); INSERT INTO tbl_score (ID, score, `subject`) VALUES (2, 86, '数学'); INSERT INTO tbl_score (ID, score, `subject`) VALUES (2, 96, '语文'); SHOW VARIABLES LIKE 'char%'; SHOW FULL COLUMNS FROM tbl_score; ALTER TABLE tbl_score CONVERT TO CHARACTER SET 'gbk';