mysql 处理中文乱码问题

时间:2021-06-19 17:35:05
CREATE TABLE tbl_score(
`ID` INT NOT NULL,
`score` DEC(,) NOT NULL,
`subject` VARCHAR() NOT NULL
); INSERT INTO tbl_score (ID, score, `subject`) VALUES (, , '语文');
INSERT INTO tbl_score (ID, score, `subject`) VALUES (, , '数学');
INSERT INTO tbl_score (ID, score, `subject`) VALUES (, , '数学');
INSERT INTO tbl_score (ID, score, `subject`) VALUES (, , '语文'); SHOW VARIABLES LIKE 'char%';
SHOW FULL COLUMNS FROM tbl_score; ALTER TABLE tbl_score CONVERT TO CHARACTER SET 'gbk';