先虚拟一张表
select '华为,小米,苹果,vivo,oppo,' brand,'手机' name from dual
union all
select '华为,小米,苹果' brand, '电脑' name from dual
select distinct * from (
select regexp_substr(a.brand, '[^,]+', 1, Level,'i') brand,name
from (
select '华为,小米,苹果,vivo,oppo,' brand,'手机' name from dual
union all
select '华为,小米,苹果' brand, '电脑' name from dual
) a
connect by Level <= LENGTH(a.brand) - LENGTH(REGEXP_REPLACE(a.brand, ',', '')) + 1)
where brand is not null order by name;
拆分后