选取特定列进行插入,需要注意的是,因为是要保存2021年之前的,所以需要将时间限定在这之前,并且是需要完整记录,所以提交时间不能为空 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(start_time)<'2021' and submit_time is not null ;