有时在比较之前在字符串中添加一些内容很有用,然后每个元素都遵循相同的格式:
with testData as
(
select 'Read Only, Write, read only, Admin' test from dual union all
select 'Read, Write, read only, Admin' test from dual union all
select 'Admin, Read Only (no), read only(see mgr), Admin' test from dual
)
select * from testData
where lower(test)||',' like '%read only,%';