我知道这个问题已被问过千分之一秒。但是给出的解决方案对我不起作用。 我有一个非常简单的存储过程,如下所示:
alter procedure sp_updateVacancyWithRecruitment
(@id int,
@idList varchar(100)
)
as
EXEC('update Vacancy_team1 set recruitment_request_id=@id where id IN ('+@idList +')')
即使以下情况也不起作用:
exec sp_updateVacancyWithRecruitment @id=5,@idList='6,8'
我做错了什么?
答案 0 :(得分:0)
alter procedure sp_updateVacancyWithRecruitment
(@id int,
@idList varchar(100)
)
as
EXEC('update Vacancy_team1 set recruitment_request_id='+@id+' where id IN ('+@idList+')')