Table-Valued Parameters

We explored common table expressions (CTEs) at the beginning of this chapter and saw how, in SQL Server 2005, they provided a new alternative to using temporary tables and table variables, which have been around for a long time in SQL Server. Table-valued parameters (TVPs) in SQL Server 2008 give us yet another choice for treating a set of rows as a single entity that you can query or join against. It is now also remarkably easy to send an entire set of rows from our .NET client applications to SQL Server with just one server roundtrip using Microsoft ADO.NET, as you’ll see close up toward the end of our discussion of TVPs.

Note

TVPs and all the remaining topics in this chapter are all-new features available only in SQL Server ...

Get Programming Microsoft® SQL Server™ 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.