O'Reilly logo

Microsoft® SQL Server 2012 Unleashed by Alex T. Silverstein, Chris Gallelli, Paul T. Bertucci, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Temp Tables Versus Table Variables Versus Common Table Expressions

SQL Server 2012 provides multiple options for working with temporary result sets in T-SQL code:

Image Temporary tables

Image Table variables

Image Derived tables

Image Common table expressions

One of the questions you may consider is, “Which method should I use and when?” Whether you use a temporary table, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required