DEV Community

[Comment from a deleted post]
 
sqlknowitall profile image
Jared Karney

Table variables are not in memory only objects. They are logged in temodb. Table variables only last for execution and don't generate statistics.

 
t4rzsan profile image
Jakob Christensen

Thanks for the clarification regarding tempdb. It seems that as of SQL Server 2017 you can create in-memory table variables.
docs.microsoft.com/en-us/sql/relat...