固定列数的行列转换如
student subject grade---------------------------student1 语文 80student1 数学 70student1 英语 60student2 语文 90student2 数学 80student2 英语 100转换为student 语文 数学 英语student1 80 70 60student2 90 80 100语句如下:select student,sum(decode(subject,'语文', grade,null)) "语文",sum(decode(subject,'数学', grade,null)) "数学",sum(decode(subject,'英语', grade,null)) "英语"from tablegroup by student