22,209
社区成员
发帖
与我相关
我的任务
分享
select id from b inner join a on B like '%'+A+'%'
试试看 这方法就是使用 like 粗暴的解决方法
declare @A varchar(100)
select @A='172.11.11.11'
select ID
from [Table]
where B like '%'+@A+'%'
;with temp(id,B) as (
select 1,'172.11.11.11|172.28.28.28' union all
select 2,'192.28.28.28'
)
select * from temp where CHARINDEX('172.11.11.11',B)>0