I want to match 2 exact words like
select col from mytable where col like '%one%two%'
but using
select col from mytable where col RLIKE '[[:<:]]one[[:>:]][[:<:]]two[[:>:]]'
it didnt' work. Any help is appreciated.
I want to match 2 exact words like
select col from mytable where col like '%one%two%'
but using
select col from mytable where col RLIKE '[[:<:]]one[[:>:]][[:<:]]two[[:>:]]'
it didnt' work. Any help is appreciated.
Your regex is incorrect. You need .*
between one
and two
as these are 2 different words. .*
will match 0 or more length text between these 2 words.
Use this query:
select col from mytable where col RLIKE '[[:<:]]one[[:>:]].*[[:<:]]two[[:>:]]'