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
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.