sql_update_以学段为单位只更新每个学科第一条记录的for_stage为y

##以学段为单位只更新每个学科第一条记录的for_stage为y
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)
请使用浏览器的分享功能分享到微信等