insert into exam_record_before_2021(uid,exam_id,start_time,submit_time,score)

select uid,exam_id,start_time,submit_time,score from exam_record

where YEAR(submit_time)<'2021'

insert into exam_record_before_2021 select null,uid,exam_id,start_time,submit_time,score from exam_record where YEAR(submit_time)<'2021' 一开始做的时候忽略了自增主键,导致运行后的结果出错