Actual demonstration:
Code:
mysql> select * from t1;
+--------+
| f1 |
+--------+
| bill |
| monica |
+--------+
2 rows in set (0.00 sec)
mysql> select * from t2;
+---------------------------------------------------------------------------------+
| f2 |
+---------------------------------------------------------------------------------+
| ....Bill gates is doing somethiing to monica lewinsky.... and monica lewinsky.. |
| bill says that bill of attainders are fon |
+---------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
mysql> select * from t1,t2 where t2.f2 like concat('%',t1.f1,'%');
+--------+---------------------------------------------------------------------------------+
| f1 | f2 |
+--------+---------------------------------------------------------------------------------+
| bill | ....Bill gates is doing somethiing to monica lewinsky.... and monica lewinsky.. |
| monica | ....Bill gates is doing somethiing to monica lewinsky.... and monica lewinsky.. |
| bill | bill says that bill of attainders are fon |
+--------+---------------------------------------------------------------------------------+
3 rows in set (0.00 sec)