当前位置:网站首页>Oracle combines multiple rows of data into one row of data
Oracle combines multiple rows of data into one row of data
2022-07-05 09:41:00 【Acacia seed~】
Preface
When I was paddling, I saw someone ask this question , Write a handy sql Make a note of .
primary sql data ( Multiple lines )
select null as v1_name, 1 as v1, ' name 2' as v2_name, 2 as v2
from dual
union all
select ' name 3' as v1_name, 3 as v1, ' name 4' as v2_name, 4 as v2
from dual

After the merger
select (wm_concat(a.v1_name)) as v1_name,
(wm_concat(a.v1)) as v1,
(wm_concat(a.v2_name)) as v2_name,
(wm_concat(a.v2)) as v2
from (select null as v1_name, 1 as v1, ' name 2' as v2_name, 2 as v2
from dual
union all
select ' name 3' as v1_name, 3 as v1, ' name 4' as v2_name, 4 as v2
from dual) a

边栏推荐
- [sorting of object array]
- 高性能Spark_transformation性能
- Community group buying exploded overnight. How should this new model of e-commerce operate?
- The research trend of map based comparative learning (gnn+cl) in the top paper
- OpenGL - Coordinate Systems
- OpenGL - Lighting
- Applet customization component
- [listening for an attribute in the array]
- Community group buying has triggered heated discussion. How does this model work?
- An article takes you into the world of cookies, sessions, and tokens
猜你喜欢
随机推荐
Figure neural network + comparative learning, where to go next?
【数组的中的某个属性的监听】
SQL learning alter add new field
一文读懂TDengine的窗口查询功能
正式上架!TDengine 插件入驻 Grafana 官网
What are the advantages of the live teaching system to improve learning quickly?
What should we pay attention to when developing B2C websites?
C # image difference comparison: image subtraction (pointer method, high speed)
项目实战 | Excel导出功能
Hosting environment API
Why do offline stores need cashier software?
Unity SKFramework框架(二十二)、Runtime Console 运行时调试工具
VS Code问题:长行的长度可通过 “editor.maxTokenizationLineLength“ 进行配置
H.265编码原理入门
[how to disable El table]
Community group buying has triggered heated discussion. How does this model work?
Unity skframework framework (XXIII), minimap small map tool
How do enterprises choose the appropriate three-level distribution system?
顶会论文看图对比学习(GNN+CL)研究趋势
[ctfhub] Title cookie:hello guest only admin can get flag. (cookie spoofing, authentication, forgery)








