Thursday, October 31, 2013

Local temporary table vs table variable - SQL Server 2008 R2/2012


could it be better to use a table variable, also the performance of the stored procedure?



Local/global temporary table do have an advantage: You can create an index on them, so sometime a temp table is the better option.


But for small amount of data a table variable is easier to handle.




Olaf Helper


[ Blog] [ Xing] [ MVP]

No comments:

Post a Comment