oracle数据库表中,如果某字段中的数据由逗号(‘,‘)分隔保存,可采用下面的sql语句,将数据分为多行
SELECT distinct
REGEXP_SUBSTR(t.fk_id, ‘[^,]+‘, 1, level) fkId,
t.*
from t_table t
connect by level <= regexp_count(t.fk_id, ‘,‘) + 1oracle根据某个字段,将数据拆分成多行
原文:https://www.cnblogs.com/leixin-nation/p/11641513.html