Episode 49: Table Variables vs Temp Tables in SQL Server

Episode 49: Table Variables vs Temp Tables in SQL Server

Episode 49: Table Variables vs Temp Tables in SQL Server 560 420 Carlos L Chacon

When you code and you need to use a temporary object what do you use in SQL Server–temp tables or a table variable?  There is plenty of conventional wisdom out there and my guest Wayne Sheffield and I talk about the differences between these two objects in episode 49 of the SQL Data Partners Podcast. In this episode we cover not only these objects, but also global temp tables and the changes these objects have in the newer versions of SQL Server.  This episode includes a discussion on

  • Are table variables stored in memory?
  • Do table variables write to disk?
  • What can temp tables have that table variables can’t?

What has your experience with temp tables and table variables been?  Have you seen something different than what Wayne and I discussed?  I am interested to know if you have other examples of using global temp tables.  Leave us a comment below and join the conversation!

 

Show Notes

Wayne on Twitter
Wayne’s Website
Wayne’s Interview Questions

About Wayne Sheffield

Temp TablesWayne is a consultant with the SQL Solutions Group and is a certified master of SQL Server.  He is an Eagle scout and a leader of the Richmond SQL Server Users Group.  Wayne is a former SQL Cruiser and is the main reason I decided to go.  He and his wife built their dream home in Cumberland, Virginia.

1 Comment
  • Podcast with Carlos Chacon/SQLDataPartners | Wayne Sheffield July 19, 2016 at 10:32 am

    […] In this podcast, we talk about Table Variables and Temporary Tables (if you’ve been to one of my presentations on this topic, then you know what’s coming!). We also talk about super-hero powers and other general chit-chat. You can hear the podcast at at this link (MP3). The “Show Notes” are available here. […]

Leave a Reply

Back to top