回复:(smofbao)SQL语句 表内数据合并
select a.number 编号,a.name 姓名,b.数学,c.英语 ,d.语文 from
(select distinct number,name from ss) a,
(select number,grade 数学 from ss where project='数学') b,
(select number,grade 英语 from ss where project='英语') c,
(select number,grade 语文 from ss where project='语文') d
where a.number=b.number and a.number=c.number and a.number=d.number