示例:
成都創(chuàng)新互聯(lián)公司主要從事成都網(wǎng)站建設(shè)、做網(wǎng)站、網(wǎng)頁(yè)設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)仁壽,10余年網(wǎng)站建設(shè)經(jīng)驗(yàn),價(jià)格優(yōu)惠、服務(wù)專業(yè),歡迎來(lái)電咨詢建站服務(wù):18980820575
with temp as (select '1,2,3' nums, 'a' names from dual union all select '4,5' nums, 'b' names from dual union all select '6,7' nums, 'c' names from dual union all select '8' nums, 'c' names from dual union all select '9,10' nums, 'c' names from dual union all select '11,12' nums, 'c' names from dual union all select '13,14' nums, 'c' names from dual union all select '15,16' nums, 'c' names from dual union all select '17,18' nums, 'c' names from dual union all select '19,20' nums, 'c' names from dual union all select '21,22,23,24,25,26,27,28,29,30,31,32,33,34' nums, 'c' names from dual ) select regexp_substr(nums,'[^,]+',1,b.lv) order_num,names from temp, (select level lv from dual connect by level<=(select max(length(regexp_replace(nums,'[^,]+'))+1) from temp)) b --用于分配行數(shù)(行數(shù)取最大的nums分隔數(shù)) where b.lv <=length(regexp_replace(nums,'[^,]+'))+1 order by order_num
文章名稱:oracle批量列轉(zhuǎn)行逗號(hào)分隔
當(dāng)前地址:http://jinyejixie.com/article18/iihhdp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)網(wǎng)站制作、面包屑導(dǎo)航、手機(jī)網(wǎng)站建設(shè)、云服務(wù)器、Google、全網(wǎng)營(yíng)銷推廣
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)