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

http://msdn.microsoft.com/en-us/library/ms190328.aspx