For example, there are two phases in table 1 and table 2, and you want to use like to perform join queries in mysql using the concat connection string selectt1.id, t1.title, t2.keywordfromt1innerjoint2ont1. titlelikeconcat (%, t2.keyword, %); oracle, S | connection string, other libraries use String concatenation
For example, there are two phases in table 1 and table 2, and you want to use like for join queries // use concat to connect the string select t1.id, t1.title, t2.keyword from t1 inner join t2 on t1.title like concat ('%', t2.keyword, '%'); // oracle, S | connection string, other libraries use String concatenation
For example, there are two phases in table 1 and table 2, and you want to use like for join queries // use concat to connect the string select t1.id, t1.title, t2.keyword from t1 inner join t2 on t1.title like concat ('%', t2.keyword, '% ');
// Oracle, s use | connection string. If other databases use string connection, select t1.id, t1.title, t2.keyword from t1 inner join t2 on t1.title like '%' | t2.keyword | '% ';
Other ideas: Exists (exists), regexp (Regular Expression), instr (string inclusion) select distinct t1.title from t1, t2 where instr (t1.title, t2.keyword ); select distinct t1.title from t1 inner join t2 on t1.title regexp t2.keyword; select * from t1 where exists (select keyword from t2 where t1.title regexp keyword ); select * from t1 where exists (select keyword from t2 where t1.title like concat ('%', keyword, '% '));