当前位置:网站首页>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

边栏推荐
- 图神经网络+对比学习,下一步去哪?
- LeetCode 496. Next larger element I
- Resolve the horizontal (vertical) sliding conflict between viewpager and WebView
- C # compare the differences between the two images
- An article takes you into the world of cookies, sessions, and tokens
- A detailed explanation of the general process and the latest research trends of map comparative learning (gnn+cl)
- 【技术直播】如何用 VSCode 从 0 到 1 改写 TDengine 代码
- OpenGL - Coordinate Systems
- 【阅读笔记】图对比学习 GNN+CL
- SQL learning - case when then else
猜你喜欢

移动端异构运算技术-GPU OpenCL编程(进阶篇)

LeetCode 496. 下一个更大元素 I

LeetCode 503. Next bigger Element II

Shutter uses overlay to realize global pop-up

Go 语言使用 MySQL 的常见故障分析和应对方法

图神经网络+对比学习,下一步去哪?

Principle and performance analysis of lepton lossless compression

为什么不建议你用 MongoDB 这类产品替代时序数据库?

Community group buying exploded overnight. How should this new model of e-commerce operate?

LeetCode 31. 下一个排列
随机推荐
Why does everyone want to do e-commerce? How much do you know about the advantages of online shopping malls?
[sourcetree configure SSH and use]
[reading notes] Figure comparative learning gnn+cl
【js 根据对象数组中的属性进行排序】
【数组的中的某个属性的监听】
STM32 simple multi-level menu (array table lookup method)
TDengine 连接器上线 Google Data Studio 应用商店
Community group buying exploded overnight. How should this new model of e-commerce operate?
Gradientdrawable get a single color
OpenGL - Coordinate Systems
MYSQL 对字符串类型排序不生效问题
【技术直播】如何用 VSCode 从 0 到 1 改写 TDengine 代码
Lepton 无损压缩原理及性能分析
Wxss template syntax
[ctfhub] Title cookie:hello guest only admin can get flag. (cookie spoofing, authentication, forgery)
【组队 PK 赛】本周任务已开启 | 答题挑战,夯实商品详情知识
Resolve the horizontal (vertical) sliding conflict between viewpager and WebView
一文读懂TDengine的窗口查询功能
C语言-从键盘输入数组二维数组a,将a中3×5矩阵中第3列的元素左移到第0列,第3列以后的每列元素行依次左移,原来左边的各列依次绕到右边
Unity skframework framework (XXIII), minimap small map tool