SqlServer 2008 new features

Below are some of the SqlServer 2008 new features :

1) Inline variable assignment :
Instead of:
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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: