Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 540 Bytes

regexp_like.md

File metadata and controls

25 lines (16 loc) · 540 Bytes

Using regexp_like()

Using multiple LIKE statements is just slow and annoying...

Welcome regexp_like()

This function allows you to use reg expression to use many LIKE statements in one line.

With LIKE

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

With regexp_like()

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

Note..

the | is OR