區(qū)域 省份 城市 華北 河北 石家莊 華北 河北 秦皇島 華北 山西 太原 華北 內(nèi)蒙古 包頭 東北 遼寧 大連 東北 吉林 吉林 東北 遼寧 沈陽 東北 遼寧 鞍山 華南 湖南 張家界 華南 廣東 廣州
變?yōu)?br /> 華北 河北,山西,內(nèi)蒙古 東北 遼寧,吉林 華南 湖南,廣東 |
select area,wmsys.wm_concat(province) from (select distinct area,province from table) group by area
select 區(qū)域 ,
substr(max(sys_connect_by_path(省份,',')),2) 省份,
from ( select
區(qū)域,省份, row_number() over(order by 省份) rn
from 表名 )
)
start with rn=1
connect by rn-1=prior rn
group by 區(qū)域
posted on 2012-04-24 18:32
cflovethisworld 閱讀(1466)
評(píng)論(1) 編輯 收藏