Pages

Ads 468x60px

Declare @i int = 1 | Diff between SQL Server 2005 and SQL Server 2008

One of the most famous interview question of SQL server is
"What is the diff. between Sqlserver 2005 and Sqlserver 2008"?
Here I am going to describe only 3 differences which is related to Declare and Set Keywords of Sql.

Differences 
1. You can declare variable and assign the value without using Set keyword in sqlserver 2008. / but not in 2005
2. You can increment the value like c# @i+=1 in sqlserver 2008. / but not in sqlserver 2005
3. You can put the break point for debug query  in sqlserver 2008. / but not in sqlserver 2005
...many other diff but here is only 3 we describing 
Declare @I int = 1
while(@I<=10)
begin
print @i
set @i+=1
end

No comments:

Post a Comment