HOW TO check if a temporary table exists before DROPping

To check if a temporary table already exists before DROPping, use

If Object_Id('tempdb..#big') is Not Null

Drop table #big

BTW, Are SQL Server Temp Tables Really Necessary?


Comments

Popular posts from this blog

2 ways to copy tooltip text from a web page

This Week I Learned - Week 27 2026

HOW TO download files hosted in Azure Web App in bulk