oracle的行列转换(原创)

oracle的行列转问题,分别使用decode函数和case then else end 语句来实现,这个cnblogs靠不靠谱啊,老是保存不上,更新内容丢失

--创建表
create table studentcoure(
stuname varchar2(30),
coureName varchar2(30),
score number
)
--插入数据
insert into studentcoure values('张三丰','太极',100)
insert into studentcoure values('张三丰','九阳真经',80)
insert into studentcoure values('张三丰','少林金刚掌',90)
insert into studentcoure values('张无忌','太极',90)
insert into studentcoure values('张无忌','九阳真经',100)
insert into studentcoure values('张无忌','少林金刚掌',80)

使用case then else end 语句来实现

oracle的行列转换 ,

欢迎转载,转载时请注明出处http://www.cnblogs.com/wanggd

 

posted @ 2012-11-17 20:22  wanggd_blog  阅读(210)  评论(0)    收藏  举报