Click here to Skip to main content
15,918,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi There,

Scenario like

SQL
SELECT x,y
INTO #Temp
FROM
(
    SELECT 1 AS x, 2 AS y
)src

SELECT * FROM #Temp


Is it necessary to delete this #Temp table?
What will happen If #Temp table is not dropped,What are the side effects ?

Any type of help would be appriciated
Posted

1 solution

Read this: http://www.simple-talk.com/sql/t-sql-programming/temporary-tables-in-sql-server/[^]

To be short: in general you don't need to, it is dropped automatically as needed. But in special cases, for performance tuning in case of long-running complex sessions you should do it manually.
 
Share this answer
 
Comments
anil.luck 14-Dec-12 2:41am    
@Zoltán Zörgő
Thank you for your help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900