oracle 列转行

with temp as(
  select 'A01' nation ,1  as S1,2 as S2, 3 as S3 from dual union all
  select 'A02' nation ,null  as S1,5 as S2, 6 as S3 from dual
)
select * from temp
unpivot(Qty for Sizes in(s1,s2,s3))

posted @ 2014-10-11 00:01  Rain520  阅读(182)  评论(0编辑  收藏  举报