存储过程模糊查询SQL codeALTER proc proc_mohuchaxun@strs varchar(50)asselect * from Player where nam
存储过程模糊查询
SQL code
ALTER proc proc_mohuchaxun@strs varchar(50)asselect * 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