ALTER proc proc_mohuchaxun
@strs varchar(50)
as
select * from Player where name like '%@strs%'
创建的时候说proc_mohuchaxun无效 什么原因?这样写有错吗
------解决方案--------------------
------解决方案-------------------- ALTER proc proc_mohuchaxun @strs varchar(50) as set @strs='%'+@strs+'%' exec sp_executesql N'select * from Player where name like @key', N'@key nvarchar(100)',@key=@strs