In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-10-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The wmsys.wm_concat function, which functions as a', 'link character
Examples are as follows:
SQL > create table idtable (id number,name varchar2 (30))
Table created
SQL > insert into idtable values (10)
1 row inserted
SQL > insert into idtable values (10gramme bc')
1 row inserted
SQL > insert into idtable values (10)
1 row inserted
SQL > insert into idtable values (20 minutes later)
1 row inserted
SQL > insert into idtable values (20 ~ (th))
1 row inserted
SQL > insert into idtable values (20m MN')
1 row inserted
SQL > select * from idtable
ID NAME
10 ab
10 bc
10 cd
20 hi
20 ij
20 mn
6 rows selected
SQL > select id,wmsys.wm_concat (name) name from idtable
2 group by id
ID NAME
-
10 ab,bc,cd
20 hi,ij,mn
SQL > select id,wmsys.wm_concat (name) over (order by id) name from idtable
ID NAME
-
10 ab,bc,cd
10 ab,bc,cd
10 ab,bc,cd
20 ab,bc,cd,hi,ij,mn
20 ab,bc,cd,hi,ij,mn
20 ab,bc,cd,hi,ij,mn
6 rows selected
SQL > select id,wmsys.wm_concat (name) over (order by id,name) name from idtable
ID NAME
-
10 ab
10 ab,bc
10 ab,bc,cd
20 ab,bc,cd,hi
20 ab,bc,cd,hi,ij
20 ab,bc,cd,hi,ij,mn
6 rows selected
Personally, I find this usage more interesting.
SQL > select id,wmsys.wm_concat (name) over (partition by id) name from idtable
ID NAME
-
10 ab,bc,cd
10 ab,bc,cd
10 ab,bc,cd
20 hi,ij,mn
20 hi,ij,mn
20 hi,ij,mn
6 rows selected
SQL > select id,wmsys.wm_concat (name) over (partition by id,name) name from idtable
ID NAME
-
10 ab
10 bc
10 cd
20 hi
20 ij
20 mn
6 rows selected
Original address: http://bbs.delit.cn/thread-206-1-1.html
Please indicate the source of the reprint:
Written by: measurement Technology http://www.delit.cn
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.