摘要:
方法1:select name,sum(case subject when'数学' then source else 0 end ) as '数学',sum(case subject when'英语' then source else 0 end ) as '英语',sum(case subject when'语文' then source else 0 end ) as '语文'from testgroup by name方法2:declare @sql varchar(8000)set @sql 阅读全文