分组后使用union
分隔符为分号;
字符串sn1;sn2;sn3;…sn1000
拼接表达式
select regexp_substr(:v_sn0,’[^;]+’,1,level) as str from dual
connect by regexp_substr(:v_sn0,’[^;]+’,1,level) is not null
union
select regexp_substr(:v_sn1,’[^;]+’,1,level) as str from dual connect by regexp_substr(:v_sn1,’[^;]+’,1,level) is not null
最后再
联合sql主题体语句
and sn in (表达式)