SELECT *
FROM Table1
INNER JOIN Table2 ON Table1.col LIKE'%' + Table2.col + ' %'
But it doesn’t seem to work at all, any help that can be given would be great, thank you!
SELECT *
FROM Table1
INNER JOIN Table2 ON Table1.col LIKE CONCAT('%', Table2.col,'%')
MySQL string connection is different from other databases, so If you want to port your application, you need to have an alternate version where || is used as the concatenation operator, as mentioned by Michael in another answer. This operator does not work in MySQL because It means or.
I have been trying to make it work for a long time, but it doesn’t seem to work, maybe it’s not even possible, what I want to do is use The example I found for executing MySQL connection query like this…
SELECT *
FROM Table1
INNER JOIN Table2 ON Table1.col LIKE '%' + Table2.col +'%'
But it doesn’t seem to work at all, any help that can be given would be great, thank you!
Try
SELECT *
FROM Table1
INNER JOIN Table2 ON Table1.col LIKE CONCAT('%', Table2.col,'%')
MySQL’s string connection is different from other databases, so if you want to port your application, you need There is an alternate version where || is used as a concatenation operator, as mentioned by Michael in another answer. This operator does not work in MySQL because it means or.