select * from table1 where col1 like '%cde%'
--或是
select * from table1 where charindex('cde',col1)>0
------解决方案--------------------
SQL code
declare @table1 table (col1 varchar(6))
insert into @table1
select 'aaa' union all
select 'abcdef' union all
select 'asdf' union all
select 'gasd' union all
select 'ssss'
select * from @table1 where col1 like '%cde%'
--或是
select * from @table1 where charindex('cde',col1)>0
/*
col1
------
abcdef
*/
------解决方案--------------------
------解决方案--------------------
------解决方案--------------------
SQL code
select * from table1 where col1 like '%cde%'
------解决方案--------------------