We can build temp tables in SQL Server 2005 in one of two ways:
declare @temp table (Column1 int, Column2 varchar);
or
create table #temp (Column2 int, Column2 varchar);
What are the distinctions between these two options? I've read differing viewpoints on whether @tmp still utilises tempdb or if everything is handled in memory.
In which situations does one perform better than the other?