Compound Assignment Operator | Description |
+= | declare @i int = 10
set @i += 3
print @i --13 |
-= | declare @i int = 10
set @i -= 3
print @i --7 |
*= | declare @i int = 10
set @i *= 3
print @i --30 |
/= | declare @i int = 10
set @i /= 3
print @i --3 |
%= | declare @i int = 10
set @i %= 3
print @i --1 |
&= | declare @i int = 10
set @i &= 3
print @i --2 |
|= | declare @i int = 10
set @i |= 3
print @i --11 |
^= | declare @i int = 10
set @i ^= 3
print @i --9 |