A new feature in Sql server 2008 TSQL is the Single Statement Variable Declaration.
What is this?
In Sql Server 2000 or Sql Server 2005 the declare statements are written as follows
Declare @i int,@j int ,@k int
set @i = 100
set @j = 200
set @k = 300
The Above Statement in Sql server 2008 can be written as
Declare @i int = 100
Declare @j int = 200
Declare @k int = 300
So the Declaration and Initialization is in a single Step!!!.


[...] Declare @i int = 10 –Single Statement Variable Declaration [...]
Original post by mattusmaximus