New Features in SQL Server 2008
IntelliSense for Query Editing
IntelliSense offers a few additional features besides just completing the world. You can see those options from SSMS
List Members
Parameter Info
Quick Info
Complete Word
Refresh Local Cache
Table-Value Parameter
In many situations, it is necessary to pass a set of table structured values to a stored procedure or function. These values may be used for updating/population a table.
CREATE TYPE Customer AS TABLE
(
CustomerId INT IDENTITY(1,1),
CustomerName VARCHAR(30)
);
GO
DECLARE @T as Customer
INSERT INTO @T(CustomerName)
VALUES ('a'),('b'),('c'),('d'),('e')
SELECT * FROM @T
Grouping Sets
Grouping Sets is an extension to the GROUP BY clause that lets users define multiple grouping in the same query. Grouping Sets produce a single result set that is equivalent to a UNION ALL of differently grouped rows, making aggregation querying and reporting easier and faster.
Example
SELECT year (order_date) AS Year, quarter (order_date) AS Quarter, COUNT (*) AS Orders
FROM sales_order GROUP BY GROUPING SETS ((Year, Quarter), (Year))
ORDER BY Year, Quarter
File Stream data