Apparently there are two ways to create a temporary table in SQL-Server:
With a table variable ( table variable )
DECLARE @tmp TABLE (Col1 INT, Col2 INT)
or with a temporary table ( temporary table )
CREATE TABLE #tmp (Col1 INT, Col2 INT)
What is the difference between them?
Original Question: What's the difference between a temp table and table variable in SQL Server?