A
A
Alexander Sinitsyn2016-03-24 04:00:34
MySQL
Alexander Sinitsyn, 2016-03-24 04:00:34

Is it possible to check the occurrence of a field value in a longer string with a sql query?

How would LIKE vice versa. Not the shorter one is contained in the field value, but the field value in the longer string.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
funtik52, 2016-03-24
@a_u_sinitsin

Like this. If you need what you write in the comments. If that makes sense, I don't know.

SELECT *
FROM `users`
WHERE "Василий Пупкин" LIKE CONCAT( "%", name, "%" )

M
Marat Mkhitaryan, 2016-03-24
@DoggerBloger

read will help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question