如题

解决方案 »

  1.   

    select * from tbl 
    where charindex('SD',col)>0 and charindex('MSD',col)=0
      

  2.   

    --这样?
    declare @t table([string] varchar(10))
    insert into @t select 'MSD'
    insert into @t select 'SD1'
    insert into @t select 'S31D1'
    insert into @t select 'MSD31'
    insert into @t select 'SD31'select * from @t where charindex('SD',[string])>0 and charindex('MSD',[string])=0
      

  3.   

    select * from t
    where charindex('SD',col) > 0
    and   charindex('MSD',col) = 0