IF OBJECT_ID('tempdb..#tempTable') IS NOT NULL
drop table #tempTableSQL Query will validate that the table exists in database and then drop it.
SQL Query will validate that the table exists in database and then drop it.
IF OBJECT_ID('tempdb..#tempTable') IS NOT NULL
drop table #tempTable