表结构如下
CREATE TABLE student_course_score (
id
int(11) NOT NULL AUTO_INCREMENT COMMENT ‘主键id’,
course_name
varchar(11) not null COMMENT ‘课程名称’,
score
int(3) not NULL COMMENT ‘分数’,
student_id
int(11) not NULL COMMENT ‘学生id’,
month
tinyint(2) not NULL COMMENT ‘月份’,
PRIMARY KEY (id
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT=‘学生分数表’;
INSERT INTO student_course_score
(id
, course_name
, score
, student_id
, month
) VALUES (1, ‘语文’, 95, 1, 1);
INSERT INTO student_course_score
(id
, course_name
, score
, student_id
, month
) VALUES (2, ‘语文’, 96, 1, 2);
INSERT INTO student_course_score
(id
, course_name
, score
, stude