IF OBJECT_ID('tempdb..#mytemptable')IS NOT Null > -- Temp.table exists > DROP TABLE mytemptable >Thanks for that, I'll note it for future use. I have since discovered that I can view what temporary tables are open during a T-SQL session by inspecting the contents of SysObjects in the TempDb database.