Home

tSQL: Drop Temp Table if Exists

Posted by SteveHardie | On: Feb 26 2014

This article describes how to check if a temporary table exists before you delete it.

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

comment closed