I
I
i_want_to_know_everything2017-02-16 01:55:27
MySQL
i_want_to_know_everything, 2017-02-16 01:55:27

LIKE only whole word?

There are table cells
088 %%% 255
088
254 %%% 088 %%% 268
452 %%% 088
8088 %%% 255
As far as I understand LIKE '% 088%' will add to the selection and 8088
It is possible to select only integers using LIKE the words?
Interested in LIKE , RLIKE ' 088$| 088 |^088 ' also not suitable for a number of reasons

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DevMan, 2017-02-16
@i_want_to_know_everything

your wishlist is out of place: LIKE doesn't solve it
rextester.com/IORH42906

I
Immortal_pony, 2017-02-16
@Immortal_pony

WHERE (
    `field` LIKE '% 088 %' OR
    `field` LIKE '% 088' OR
    `field` LIKE '088 %' OR
    `field`='088'
)

K
Konstantin Tsvetkov, 2017-02-16
@tsklab

Is it possible to use LIKE to select only whole words?
(' ' + field + ' ') LIKE '% 088 %'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question