##以学段为单位只更新每个学科第一条记录的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)
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9240380/viewspace-668201/
,如需转载,请注明出处,否则将追究法律责任。