SELECT regexp_substr('CITY_AA,CITY_BB,CITY_CC,CITY_DD', '[^,]+', 1, LEVEL) t
FROM dual
CONNECT BY regexp_substr('CITY_AA,CITY_BB,CITY_CC,CITY_DD', '[^,]+', 1, LEVEL) IS NOT NULL
;
返回:
CITY_AA
CITY_BB
CITY_CC
CITY_DD
SELECT regexp_substr('CITY_AA,CITY_BB,CITY_CC,CITY_DD', '[^,]+', 1, 2) t
FROM dual
;
返回:
CITY_BB