Like other .net programming languages compound assignment operators are introduced in SQL Server 2008. If you want to do any basic arithmatic operation (+, -, *, /, %) with any variable and simultaneously assign it to the variable then this proves to be easier in implementation.
DECLARE @MyIntVar INT = 4
SET @myINTVar += 2
SELECT @myINTVar
Showing posts with label compound assignment operator. Show all posts
Showing posts with label compound assignment operator. Show all posts
Monday, August 18, 2008
Compound Assignment Operators (SQL Server 2008)
Labels:
compound assignment operator,
SQL Server 2008,
T-SQL
Subscribe to:
Posts (Atom)
