Learn about SQL Server 2008 - New Features
I would like to highlight two of the new features available in SQL Server 2008.
1. Row Constructor:
With earlier version of SQL Server to insert mutiple rows into a table with different values for column, we used to write multiple insert statements. If we need 100 rows then we have to write 100 insert statements.
With SQL Server 2008 we can do the same with a single insert statement like the following,
INSERT INTO [table_name] ([column1], [column2], etc)
('column1_value','column2_value', etc,) --Row2
2. Grouping Sets:
With previous versions, if we want to get counts on records based on each column we had to write separate queries to get them.
To get count of name and age from table person. We would write the following two queries.
SELECT name, count(*) from person
GROUP BY name
SELECT age, count(*) from person
GROUP BY age
But with SQL Server 2008 it can be done with the Grouping sets.
SELECT name, age, count(*) from person
GROUP BY GROUPING SETS(
ORDER BY name, age
Thanks for your post....this Article is nice
Thanks for u r updates..
one more feature that is excellent one is given in this link