I have a table that has the following definition:
Table name: MY_TAB
ID NUMBER,
ACCESS_LVL CLOB
Some example data that may exist within this table is as follows:
ID: 1
ACCESS_LVL: RoleName-A,RoleName-B,RoleName-C,RoleName-D,RoleName-E
ID: 2
ACCESS_LVL: RoleName-D,RoleName-E
ID: 3
ACCESS_LVL: RoleName-A,RoleName-B,RoleName-C,RoleName-D,RoleName-E,RoleName-F,RoleName-G,RoleName-H
ID: 4
ACCESS_LVL: RoleName-E
The query I am unsure how to do is that I need to return all the IDs
that may have the following ACCESS_LVL values (where ACCESS_LVL is a clob), i.e.
RoleName-B,RoleName-C,RoleName-D
Basically something like:
select id
from my_tab
where ('RoleName-B','RoleName-C','RoleName-D') in (ACCESS_LVL)
So the result in this example would be just:
ID
1
2
3