Compound Operators in SQL Server 2008 - Better Syntax

By [)ia6l0 iii

The compound operator in SQL Server 2008 offers the simpler syntax which all developers looked for.

These Compound operators let you do the common addition, subtraction, multiplication and other mathematical operations with a simpler syntax.

For a code sample, look below:

DECLARE @testVariable INT
SET @testVariable= @testVariable + 5

Can be now rewritten as,
SET @testVariable+= 5

Compound Operators in SQL Server 2008 - Better Syntax  (1045 Views)