Press "Enter" to skip to content

Table Variables Live in tempdb

Robert French proves that table variables are not memory-only objects:

When I talk to people about table variables one of the items of advice that I give them, is that table variables are NOT created in memory.  Just like temporary tables are created in TempDB.  There might be some people reading this which disagree with me.  So, let’s run some code.

Click through for a demonstration.