View Single Post
Old 11-30-2012, 11:18 PM   PM User | #3
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,168
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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)
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote