将表列拆分为n列 [英] Splitting table Column into n column
本文介绍了将表列拆分为n列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
伙计们,
我想执行以下操作:
我有下表的示例:
ID
-
1
2
3
4
5
6
7
8
9
10
11
12
我想使其如下所示:
ID_COL1 ID_COL2 ID_COL3 ID_COL4
1 2 3 4
5 6 7 8
9 10 11 12
谁能帮助我继续做功能或仅查询(数据库级别)
Hellp Guys,
I wanted to do the following:
I have the following table for example:
ID
--
1
2
3
4
5
6
7
8
9
10
11
12
I wanted to make it like the following:
ID_COL1 ID_COL2 ID_COL3 ID_COL4
1 2 3 4
5 6 7 8
9 10 11 12
Can anyone help me onw how to do it as function or query only (DB Level)
推荐答案
您的问题尚不清楚..,但听起来像PIVOT ..,
浏览以下链接,这可能对您有帮助
^ ]
Your Question not clear.., but it sounds like PIVOT..,
Go through the below link this may helps you
PIVOT in Oracle[^]
这篇关于将表列拆分为n列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文