I\'m writing some code as following:
select a.year, a.date, a.town, a.city from table1 a left outer join table2 b on a.town like concat (\'%\', b