Q:

MYSQL: How to check if a string contains a value within the same row

I would like to check if a string in a certain cell of the database is part of a string in another cell of the same row.
The following example makes it more clear. Let's say that my table looks like this:
+---------+-----------------+
|  Name   |     Couple      |
+---------+-----------------+
| Mark    | Mark & Thomas   |
| Chris   | Thomas & Logan  |
| Patrick | Logan & Patrick |
| Thomas  | Chris & Mark    |
| Logan   | Patrick & Chris |
+---------+-----------------+

Then the result of my query would have to be this:
+---------+-----------------+
|  Name   |     Couple      |
+---------+-----------------+
| Mark    | Mark & Thomas   |
| Patrick | Logan & Patrick |
+---------+-----------------+

Because Mark and Patrick are part of the string in the Couple field.
I gave it a try, but I don't think it's the right way to do this:
Select * from table where Couple like %Name%

Thanks for your answer(s)!

A:

Your syntax was close, you can use:
Select name, couple
from yt 
where Couple like concat('%', Name, '%');

See SQL Fiddle with Demo

A:

Think you have the columns the wrong way round, and you need the wild cards in the string you are comparing.
Maybe:-
SELECT * FROM table WHERE Couple LIKE CONCAT('%', Name, '%')

