if object_id('[tempdb]..#tb') is not null drop table #tb;
go
create table #tb (id int,NOTEXT VARCHAR(20),Snumber int) ;
go
insert into #tb -- select * from #tb
select '1','1 12 13 14 25 26','14'
union all select '2','2 13 14 15 16 27','24'
union all select '3','1 11 12 13 14 25','11'
union all select '4','1 12 13 14 25 26','21'
union all select '5','1 12 13 14 25 26','12'
例如 表#tb
ID notext Snumber
1 1 12 13 14 25 26 14
2 2 13 14 15 16 27 24
3 1 11 12 13 14 25 11
4 1 12 13 14 25 26 21
5 1 12 13 14 25 26 12
SQL批量查询notext字段包含了Snumber的所有记录
查询的结果
ID notext Snumber
1 1 12 13 14 25 26 14
3 1 11 12 13 14 25 11
5 1 12 13 14 25 26 12