oracle 查询一个表字段作为另一个表in条件

PHOTO EMBED

Mon Feb 20 2023 11:41:05 GMT+0000 (Coordinated Universal Time)

Saved by @moonlune

select t.score, t.khbm, t1.wayattrib
  from EXAM_SCORE t, EXAM_WAY t1
 where t.wayid = t1.id
 and t.wayId in
       (select regexp_substr(t.wayids, '[^,]+', 1, level)
          from (select t.wayids from EXAM_ITEM t where t.code = 'qwzhkh') t
        connect by regexp_substr
         (t.wayids, '[^,]+', 1, level) is not null);
content_copyCOPY

https://blog.csdn.net/fenggeshishen/article/details/114304846