select stu.name, sum(k.price) (select name, regexp_substr(books, '[^,]+', 1, level) book --regexp_substr(str,reg,起始位置 第几次) from students connect by level <= regexp_count(books, ',') + 1 --regexp_count(teachers, ',') 统计字符串中,的数量 and id = prior id and prior dbms_random.value is not null) stu --筛选掉空数据 left join book k on k.code = stu.book --------------------- 作者:晓豆其实不太逗 来源: 原文:https://blog.csdn.net/weixin_43053679/article/details/82687764 版权声明:本文为博主原创文章,转载请附上博文链接!