SQL Server 2008 – New Features

SQL Server 2008 shipped a batch of T-SQL and engine features that changed day-to-day development — several of them became so standard that it is easy to forget they had a “before” time. Here is what arrived, what it replaced, and how each one is used today.

Date and time get their own types

Before 2008, a “date only” column was a datetime full of 1900-01-01 00:00:00 values. SQL Server 2008 introduced date, time, datetime2, and datetimeoffset — bigger ranges, better precision, and no more storing midnight noise when you only need the day. datetime2 should be the default datetime type in any new schema.

hierarchyid: trees without recursive CTEs

The hierarchyid type stores organizational charts, bill-of-materials, and folder trees as compact paths, with methods like GetAncestor(), IsDescendantOf(), and GetDescendant() replacing hand-rolled recursive queries. In practice, most teams still reach for an adjacency list with a recursive CTE unless the hierarchy is large and read-heavy — but the type is fully supported and indexed.

GROUPING SETS

GROUPING SETS computes multiple aggregation levels in one pass over the data: totals by day, by month, and grand total in a single statement, instead of a UNION of three GROUP BY queries. ROLLUP() and CUBE() are shorthand for the common hierarchy cases.

MERGE

The MERGE statement upserts a source into a target — insert new rows, update changed ones, optionally delete missing ones — in a single set-based statement. It replaced the “update, check @@ROWCOUNT, insert” dance. Worth knowing in 2026: the community consensus (and Aaron Bertrand’s well-known writeup) is to use MERGE with care — known bugs around concurrency and triggers led many shops to prefer separate UPDATE + INSERT in a transaction. It was also never ported to Azure SQL Data Warehouse/Synapse.

FILESTREAM

FILESTREAM stores BLOBs on the NTFS file system while keeping transactional consistency and backup integration with the database — the middle ground between a VARBINARY(MAX) column and rolling your own file store. Later releases layered FileTable (2012) on top. For most applications in 2026 the honest answer is: keep BLOBs out of the database entirely and store object URLs (S3/Azure Blob Storage); FILESTREAM remains relevant for on-prem systems with document-management requirements.

Spatial data

New geometry and geography types brought planar and geodetic spatial data — points, lines, polygons — into the engine with spatial indexes. Fine for moderate spatial workloads on-prem; PostGIS is still the reference for serious GIS.

Sparse columns

The SPARSE keyword optimizes columns that are mostly NULL (typical threshold: 20-40% NULL, varies by type) by not storing them at all — a nice fit for wide “optional attributes” tables. The trade-off: slightly higher cost to retrieve non-NULL values, and no direct use in some features like change data capture.

The 2008 video this post originally pointed to

The original version of this post embedded a “must see” SQL Server 2008 overview video. Embedded Flash is long dead, so here is the distilled list instead — which is the part that actually aged well: date/time types, hierarchyid, GROUPING SETS, MERGE, FILESTREAM, spatial types, and sparse columns were all headline features of the release, and every one of them is still supported on current SQL Server versions.

Leave a Reply

Your email address will not be published. Required fields are marked *