Sql join on wildcard

This article is tagged with: Sql join on wildcard and mysql

sql join on wildcard

select *
from tableA a join
tableB b
on a.id like '%' + b.id + '%';

sql join on wildcard

select *
from tableA a
where exists (select 1 from tableB b where a.id like '%' + b.id + '%');

This article is tagged with: Sql join on wildcard and mysql