有个地方写错了
insert table2 select a.系别,a.f1,b.f2,c.f3 from (select 系别,count(*) as f1 from table2 group by
系别)a,(select 系别,count(*) as f2 from table2 where 职称='教授' group by 系别)b,
(select 系别,count(*) as f3 from table2 where 职称='副教授' group by 系别)c
where a.系别=b.系别 and a.系别=c.系别
insert table2 select a.系别, from (select 系别,count(*) as f1 from table2 group by
系别)a,(select 系别,count(*) as f1 from table2 where 职称='教授' group by 系别)b,
(select 系别,count(*) as f1 from table2 where 职称='副教授' group by 系别)c
where a.系别=b.系别 and a.系别=c.系别