把逗号分割的字符串转换为可放入in的条件语句的字符数列 Oracle

来源:互联网 发布:淘宝商品排名突然下降 编辑:程序博客网 时间:2024/06/05 07:45

原文:

https://blogs.oracle.com/aramamoo/entry/how_to_split_comma_separated_string_and_pass_to_in_clause_of_select_statement

 

select regexp_substr('SMITH,ALLEN,WARD,JONES','[^,]+', 1, level) from dual
connect by regexp_substr('SMITH,ALLEN,WARD,JONES', '[^,]+', 1, level) is not null

原创粉丝点击