Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#temp in SQL 2000 (MSDE) 1

Status
Not open for further replies.

Niv3k

Programmer
Jul 11, 2001
350
US
I didn't explicitly DROP #temp at the end of a procedure, and the next time I ran it, it gave me an error message that the table was still there. I added the DROP #temp now, but I thought a temp table was automatically destroyed when the process it was created by terminated... I guess I'm wrong on this, can someone explain to me how temp tables are stored in memory?
 
The temporary tables are there in memory unless SQL Server connection is dropped before the next execution of your procedure. So you should drop the table just before your procedure ends in order to clear the memory before the next execution.
 
ahhh... okay, that makes sense. Thanks!

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top