日期:2014-05-16  浏览次数:20448 次

请问一个SQL查询语句的问题



麻烦各位大神帮忙看下, 怎么查询能出右面的效果
------解决方案--------------------
试试这个:
select [year],
       max(case when [month]=1 then [no] else null end) m1,
       max(case when [month]=2 then [no] else null end) m2,
       max(case when [month]=3 then [no] else null end) m3
       
from 表
group by [year]