码迷,mamicode.com
首页 > 数据库 > 详细

oracle 列转行

时间:2014-10-11 01:12:44      阅读:230      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   for   sp   div   2014   

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))

bubuko.com,布布扣

oracle 列转行

标签:style   blog   http   color   io   for   sp   div   2014   

原文地址:http://www.cnblogs.com/ycdx2001/p/4018136.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!