日期:2014-05-18 浏览次数:20721 次
create table test1
(strA varchar(100))
insert into test1 select 'abc·defghig' union all
select '12345%67'
select * from test1 where CHARINDEX ('·',strA)>0 or CHARINDEX ('%',strA)>0 or CHARINDEX ('(',strA)>0 or CHARINDEX (')',strA)>0
------解决方案--------------------
create table a(b varchar(100))
insert into a
select 'qeturojt'
select'123%34358' union all
select'1233435#8' union all
select'1(3%34358' union all
select'1.3#43)8'
select * from a where b like '%.%' or b like '%#%'
or CHARINDEX('%',b)>0 or b like '%(%' or b like '%)%'
drop table a