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 not isnull(submit_time)

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

简写 not null  not isnull()

句法;
insert into 新表(列1,列2)
select 列1,列2 from 老表
where 条件