Create Proc ABC
Declare @Var1 VARCHAR (MAX)
Declare @Var2 Int
As BEGIN
Update Table Set Column = @Var1 where Column1 in (@Var2)
End
EXEC ABC @Var1 = 'ABCD', 'ABCDE' @Var2= 14
传递给Varibale @Var1
的多个参数不起作用
答案 0 :(得分:0)
执行以下操作:
EXEC ABC @Var1 = 'ABCD, ABCDE' @Var2= 14
答案 1 :(得分:0)
您必须使参数值像带有逗号分隔值的列表一样。
Create Proc ABC
Declare @Var1 VARCHAR (MAX)
Declare @Var2 Int
As BEGIN
Update Table Set Column = @Var1 where Column1 in (@Var2)
End
EXEC ABC @Var1 = '''ABCD'', ''ABCDE''' @Var2= 14
喜欢-
EXEC ABC @Var1 = '''ABCD'', ''ABCDE''' @Var2= 14