2011-11-25 49 views

回答

26

如何:

declare @inserted BIT = 0, @removed BIT = 0 

作品在SQL Server 2008和了(你没有指定的SQL Server版本 ....)

更新:好了,所以你坚持SQL Server 2005上 - 在这种情况下,我相信这是最好的,你可以这样做:

DECLARE @inserted BIT, @removed BIT 
SELECT @inserted = 0, @removed = 0 
+0

谢谢,但我有SQL Server 2005。 –

1

,但有可能使这个更简单,并使用类似:

SET @inserted, @removed = 0 

我想哟意味着

SET @inserted = @removed = 0 

不,那是不可能的。 T-SQL不支持这种语法。

相关问题