It’s possible to do a LIKE SQL after some characters?
x
Exemple:
" Arthur is wanted : A test"
" Arthur is wanted : B"
" Arthur is wanted : BE COOL A"
" Arthur is wanted : ANSWER B"
I wanted “LIKE” sql after “:” with ” A” So, REGEX like should be return only the first and third sentence. For the fourth sentence, i added ” ANSWER” should not itself return because the regex is ” A” and not ” A%”
Do you have an idea?
Advertisement
Answer
Simply include the colon in your LIKE expression.
select *
from yourtable
where yourcolumn like '%:%A %'
OR yourcolumn like '%:%A'
or, adjust your text slightly:
select *
from yourtable
where yourcolumn+' ' like '%:%A %'