I am trying to select all the strings has word ABC1 in it. But getting wrong answer with LIKE query. Not sure how to get exact answer.
Below is the string format in a column:
"SomeString ABC1000 Other";
And I don’t want to select any String which is in the format like
"itisABC1000 other other"
2
Answers
Found answer with LIKE
select column
from table
where conditions like "% ABC1%" or conditions like "ABC1%";
Thank you!
with reular expression you can use
REGEXP_LIKE
this oirks for MYsql 8.x
fiddle
Your query would wlook like
for older Versions like 5.7
fiddle
so the query would look like