Difference between Variable Table(@) and Temp(#) table

Table variables are Transaction neutral. They are variables and thus aren’t bound to a transaction. Temp tables behave same as normal tables and are bound by transactions. Consider Following Example —————————————– BEGIN TRAN declare @var table (id int, data varchar(20) ) create table #temp (id int, data varchar(20) ) insert into @var select 1, ‘data

Read More