-- ('25','81','106') 里的单引号改成双引号
-- 在最后面加单引号set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER Procedure [dbo].[isDel]
AS
DECLARE @strTmp nvarchar(1000) 
set @strTmp = 
'update a,b set a.hotNum=1,a.RegTime=getDate(),b.Reg=1,b.RegTime=getDate() where a.id in(''25'',''81'',''106'') and b.id in(''25'',''81'',''106'')'
EXEC SP_EXECUTESQL @strTmp
Go