T-SQL Temp Table Check

By | 2019-10-21

What’s better than dropping your temp tables at the end of every script? Checking for their existence at the beginning of the script and dropping them.

IF OBJECT_ID('tempdb..#t') IS NOT NULL DROP TABLE #t;

Leave a Reply

Your email address will not be published. Required fields are marked *