Below are some of the SqlServer 2008 new features :
1) Inline variable assignment :
DECLARE @myVar int
SET @myVar = 5
you can do it in one line:
DECLARE @myVar int = 5
2) C# like syntax:
SET @i += 5
3) Auditing :
Sql Server2008 Auditing feature is a superb feature to audit ur changes later, for this SqlServer2008 introduced the automatic auditing feature.
4) Processing of delimited strings:
This is awesome and I have used this feature.
Currently, we pass in delimited strings in the following manner:
exec sp_demoProc ‘Rohit,35;Mayank,31;Rider,27;Lakhan,42’
In 2008, Microsoft introduced Table Value Parameters (TVP).
CREATE TYPE PeepsType AS TABLE (Name varchar(20), Age int)
DECLARE @myPeeps PeepsType
INSERT @myString SELECT ‘Rohit’, 35
INSERT @myString SELECT ‘Mayank’, 31
INSERT @myString SELECT ‘Rider’, 27
INSERT @myString SELECT ‘Lakhan’, 42
exec sp_MySproc2 @myString
5) Intellisense :
This is another great feature of SqlServer2008, now user gets the Intellisense while writing the SPs and Queries just like we get in .Net.