select * from a, b where instr(',' || b.字段 || ',', ',' || a.字段 || ',' ) > 0;
select * from a, b where instr(',' || b.字段 || ',', ',' || a.字段 || ',' ) > 0;
with a as (select 'a123' aa from dual) ,b as (select 'a123,b456' bb from dual union all select 'c789,d123' from dual union all select 'a123,dadaf' from dual )select * from a,b where bb like '%'||aa||'%'--result:a123 a123,b456 a123 a123,dadaf
select * from a, b
where instr(',' || b.字段 || ',',
',' || a.字段 || ',' ) > 0;
where instr(',' || b.字段 || ',',
',' || a.字段 || ',' ) > 0;
(select 'a123' aa from dual)
,b as
(select 'a123,b456' bb from dual
union all
select 'c789,d123' from dual
union all
select 'a123,dadaf' from dual
)select * from a,b where bb like '%'||aa||'%'--result:a123 a123,b456
a123 a123,dadaf
a表里有270行,我想保留a表所有值。b表符合条件的列出。