可以这样写选择查询语句:
select a.编码,a.药品名称 from 表A a where exists(select 1 from 表B b where a.药品名称 like '*' & b.药品名称 & '*');