Pattern search using SQL

Instead of exact matching, the following code allows you to do a pattern search by joining two table using like operator.

SELECT *
FROM Table1
INNER JOIN Table2 ON Table1.col LIKE '%' + Table2.col + '%'