Fixed What's the difference between a temp table and table variable in SQL Server? #dev #it #asnwer
Fixed What's the difference between a temp table and table variable in SQL Server? #dev #it #asnwer
What’s the difference between a temp table and table variable in SQL Server?
In SQL Server 2005, we can create temp tables one of two ways:
declare @tmp table (Col1 int, Col2 int);
or
create table #tmp (Col1 int, Col2 int);
What are the differences between the two? I have read conflicting opinions on whether @tmp still uses tempdb, or if everything happens in memory.
In which scenarios does…
View On WordPress












