Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Compare a comma separated string to another value

TinaFeb 18 2020 — edited Feb 19 2020

Hi Gurus,

  I have a table where column has comma separated list.

  Is there a way to use that column in in-clause to compare with individual values?

  

create table a

(col varchar2(100));

insert into a values('a,b,c,d');

insert into a values('c,d,e,f');

commit;

select * from a

where col_val in ('a','b');

Thanks

This post has been answered by mNem on Feb 18 2020
Jump to Answer
Comments
Post Details
Added on Feb 18 2020
11 comments
3,873 views