oracle 10g 行列转换 通过decode和union all 实现
摘要:
行转列例子: select * from grade select student ,max(decode(subject,'en',grade,null)) 英语 ,max(decode(subject,'ch',grade,null)) 语文,max(decode(subject,'ma',grade,null)) 数学 from grade group by student列转行:创建测试表create table test asselect student ,max(decode(subject,'en',grade,nu 阅读全文
posted @ 2012-09-02 19:17 lanyue52011 阅读(610) 评论(0) 推荐(0) 编辑