SQL传数组到存储过程中
方法一 CREATE PROC D_t_Base_Employee @str varchar(100) as declare @sql varchar(1000) set @sql='DELETE Employee WHERE ID IN ('+@str+')' exec (@sql) go 方法二 CREATE PROC D_t_Base_Employee @str varchar(100) as DELETE Employee WHERE CHARINDEX(','+CAST(id as varchar)+',',','+@str+',')>0 go