##以学段为单位只更新每个学科第一条记录的for_stage为y
update e_subjectinfo set for_stage=null;
update e_subjectinfo set for_stage=null;
update e_subjectinfo a set a.for_stage='Y'
where a.rowid=(select min(b.rowid) from e_subjectinfo b where a.subjectname=b.subjectname and a.teachstage=b.teachstage)