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.

Transcription: Temp Tables vs Table Variables

Coming soon!