declare @t table([Name] nvarchar(10))
insert @t select '好的啊!'
insert @t select '12345好的'
insert @t select '123'
insert @t select 'sdff'
select * from @t where PATINDEX('%[吖-座]%',[name])>0
/*
Name       
---------- 
好的啊!
12345好的(所影响的行数为 2 行)*/

解决方案 »

  1.   

    select * from @t where [name] like '%[吖-座]%'
      

  2.   

    declare @t table([Name] nvarchar(10))
    insert @t select '好的啊!'
    insert @t select '12345好的'
    insert @t select '123'
    insert @t select 'sdff'
    select * from @t where PATINDEX('%[吖-座]%',[name])>0
    /*
    Name       
    ---------- 
    好的啊!
    12345好的(所影响的行数为 2 行)*/
      

  3.   

    '%[吖-座]%' 
    好像是中文的unicode 代码范围
      

  4.   

    declare @t table([Name] nvarchar(100))
    insert @t select N'地,地387道,道'
    insert @t select N'地地387道。道'
    insert @t select N'地地道道'
    insert @t select N'地,地387道,SDSD'
    insert @t select N'123'
    select * from @t where patindex('%[0-9]%',[Name])>0 --包含數字
    select * from @t where patindex('%[吖-座]%',[Name])>0 --包含漢字
    select * from @t where patindex('%[a-zA-Z]%',[Name])>0 --包含字母网上baidu,google的,呵呵,不好意思!