Inline Declaration and value assignation in SQL Server 2008


In older environment, we need to declare the variable and set the value for the varaible as below,
 
 

DECLARE @VAL INT , @VAL1 INT
SET @VAL=10
SET @VAL=20
In the newer version of SQL Serve 2008, we are having inline declaration and value assignation.


 

DECLARE @VAL INT =97, @VAL1 INT =1
Cheers,

Venkatesan Prabu .J
Head - WWW.Kaashivinfotech.com
http://venkattechnicalblog.blogspot.com/