日期:2014-05-17 浏览次数:20693 次
declare @a varchar(100)
select @a='[搜索值]'
select * from dd where aa like '%'+@a+'%'
DECLARE @a VARCHAR(100)
SET @a = 'test'
select * from dd where aa like '%'+@a+'%'
DECLARE @a VARCHAR(100)
select * from dd where aa like '%'+ISNULL(@a, '')+'%'