建表语句:
drop table test purge;
create table test(id number,name varchar2(20),score number);
insert into test values(1,'a',95);
insert into test values(1,'b',82);
insert into test values(1,'c',73);
insert into test values(2,'d',56);
insert into test values(2,'e',74);
commit;
字符类型列合并:
select id 代号,wm_concat(name) 合并结果 from test group by id;
非字符类型列合并:
select id 代号,wm_concat(to_char(score)) 合并结果 from test group by id;
总结
以上是编程之家为你收集整理的oracle中行转列语句参考全部内容,希望文章能够帮你解决oracle中行转列语句参考所遇到的程序开发问题。
如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。