同意楼上.或者用: select * from table1 where charindex(aaa,'1234567')=1
--下面是测试--测试数据 declare @t table(aaa varchar(10)) insert into @t select '234' union all select '123' union all select '12345' union all select '123456' union all select '123456789'--查询 select * from @t where charindex(aaa,'1234567')=1/*--测试结果 aaa ---------- 123 12345 123456(所影响的行数为 3 行)--*/
select * from table1 where charindex(aaa,'1234567')=1
declare @t table(aaa varchar(10))
insert into @t
select '234'
union all select '123'
union all select '12345'
union all select '123456'
union all select '123456789'--查询
select * from @t where charindex(aaa,'1234567')=1/*--测试结果
aaa
----------
123
12345
123456(所影响的行数为 3 行)--*/