Multiple strings in LIKE condition - Presto SQL

Viewed 6875

I want to query a column in my table using a LIKE condition and this works fine-

select * from my_table where my_column LIKE '%hello%';

But, how do I query this column with multiple strings in my LIKE condition? Looking for something like-

select * from my_table where my_column LIKE ['%hello%'|'example%'|'%random%'|'%demo'];
1 Answers

Use regexp_like():

select *
from my_table
where regexp_like(my_column, 'hello|example|random|demo');
Related