34,838
社区成员




with tm (code) as
(
select 'string' union all
select 'astringb' union all
select 'astring' union all
select 'stringb' union all
select 'cccdddaastringbb' union all
select 'cccddeaastringbbeeffff'
)
select * from tm where code like '%aastringbb%' or 'aastringbb' like '%'+code+'%'
试试这样符不符合你的要求