--数据装载 Create Table #T(Column1 varchar(20)) insert #T select '040011' union all select '010021' union all select '024综合' union all select '021不知道' union all select '031不' union all select '不3' union all select '知道'--1:求包含数字,且长度为6的集合(包含了中文) select * from #T where Column1 not like '%[0-9]%' --select * from #T where Column1 like '%[0-9]%' --and len(Column1)=6 drop table #T
Create Table #T(Column1 varchar(20))
insert #T select '040011'
union all select '010021'
union all select '024综合'
union all select '021不知道'
union all select '031不'
union all select '不3'
union all select '知道'--1:求包含数字,且长度为6的集合(包含了中文)
select * from #T where Column1 not like '%[0-9]%' --select * from #T where Column1 like '%[0-9]%' --and len(Column1)=6
drop table #T
like '%^关键字%' 测试不行