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

SQL
 

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.


Code
 

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

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