SQL SERVER 2008 has introduced new concept of Compound Assignment Operators. Compound Assignment Operators are available in many other programming languages for quite some time. Compound Assignment Operators is operator where variables are operated upon and assigned on the same line.
Let us see following operation without using Compound Assignment Operators.
DECLARE @myVar INT
SET @myVar = 10
SET @myVar = @myVar * 5
SELECT @myVar AS MyResult
GO
Above operation can be done using Compound Assignment Operators as demonstrated in following script.
DECLARE @myVar INT
SET @myVar = 10
SET @myVar *= 5
SELECT @myVar AS MyResult
GO
Reference : Pinal Dave (http://www.SQLAuthority.com)





