13232163126
高级会员
高级会员
  • 发帖数28
  • QQ2778146585
  • 金币138两
  • 威望237点
  • 钻石0枚
  • 注册日期2022-08-25
  • 最后登录2024-04-26
阅读:476回复:0

[资源分享]分享下sql,一行数据按逗号分开转成一列

楼主#
更多 发布于:2023-02-07 18:21
with t1 as (select 'aa,bbb,sd,asda,ss,saf,123,fwdf'aa from dual)                                    
select regexp_substr((select aa from t1),'[^,]+',1,LEVEL,'i') from dual
connect by level <= length((select aa from t1))-length(regexp_replace((select aa from t1),',',''))+1


图片:微信图片_20230207181849.jpg

喜欢0 评分0
游客

返回顶部