Call now: (800) 766-1884  


 SQL Server Tips
 SQL Server Training

 SQL Server Consulting
 SQL Server Support
 SQL Server Remote DBA

 SQL Server Scripts
 Scripts Menu




  SQL Server Tips by Gama and Naughter


Local temporary tables


A local temporary table's name starts with #, this table will be created and exist only during a user's connection. Other users cannot access it and it will be deleted either by the user or by the server, once the connection ends. Local temporary tables are stored in table sysobjects from database tempdb, more specifically in column "name" and they have their original name plus many underscore signs and finally 000000000016 at the very end. The number of underscore signs is enough to keep the name column with 128 characters. For example for temporary table #mytempt the column name would be:

#mytempt____ 108 underscore signs _____000000000016

The above book excerpt is from:

Super SQL Server Systems
Turbocharge Database Performance with C++ External Procedures

ISBN: 0-9761573-2-2
Joseph Gama, P. J. Naughter


Burleson Consulting Remote DB Administration







Burleson is the America's Team

Note: The pages on this site were created as a support and training reference for use by our staff of DBA consultants.  If you find it confusing, please exit this page.

Errata?  SQL Server technology is changing and we strive to update our SQL Server support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:and include the URL for the page.

Burleson Consulting
SQL Server database support


Copyright 1996 -  2013 by Vaaltech Web Services. All rights reserved.

Hit Counter