SQL Server 2005 and temporary table scope

前端 未结 3 1373
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-01 05:21

I\'ve read around the subject of temporary tables and scope and all the answers i\'ve seen don\'t seem to talk about one of my concerns.

I understand that a local te

3条回答
  •  悲&欢浪女
    2020-12-01 05:43

    You might also think about using table variables. They have a very well-defined scope, and they are sometimes faster than their temporary table counterparts. The only problem with table variables is that they cannot be indexed, so some performance could be lost despite their nature. Check here for some more information on the subject.

提交回复
热议问题