试来不行啊set @eab='Standard' select * from TeamAllMsg where all_match like '%'+@eab+'%' select * from TeamAllMsg where all_match like '%Standard%'第一条找不到记录 第二条能找到记录啊,
create proc prtest (@c varchar(20)) as select * from tablename where A like '%'+@c+'%'
create proc prtest (@c varchar(20)) as declare @temp varchar(20) set @temp='%'+@c+'%' select * from tablename where A like @temp这样试试
不行啊 set @eab='Standard' set @ea='%'+@eab+'%' print @ea输出的是: %Standard问题是出在这么,该怎做啊
create procedure sp_test(@str varchar(20)) as select * from 表 where ','+A+',' like '%,'+@str+',%' go
declare @eab varchar(20),@ea varchar(20) set @eab='Standard' set @ea='%'+@eab+'%' print @ea
select * from TeamAllMsg where all_match like '%'+@eab+'%'
select * from TeamAllMsg where all_match like '%Standard%'第一条找不到记录
第二条能找到记录啊,
(@c varchar(20))
as
select * from tablename where A like '%'+@c+'%'
(@c varchar(20))
as
declare @temp varchar(20)
set @temp='%'+@c+'%'
select * from tablename where A like @temp这样试试
set @eab='Standard'
set @ea='%'+@eab+'%'
print @ea输出的是: %Standard问题是出在这么,该怎做啊
as
select * from 表 where ','+A+',' like '%,'+@str+',%'
go
set @eab='Standard'
set @ea='%'+@eab+'%'
print @ea