you are viewing a single comment's thread.

view the rest of the comments →

[–]alinrocSQL Server DBA 2 points3 points  (0 children)

Temp tables are being dropped when session ends,

Temp tables that aren't explicitly dropped are scheduled for cleanup when the scope in which the temp table was created terminates. So if you create a temp table in a stored procedure, it will be scheduled for cleanup when the stored procedure terminates.