IF OBJECT_ID('tempdb.dbo.#SeatStatus', 'U') IS NOT NULL DROP TABLE #SeatStatus; -- 'U' is object type : U = Table (user-defined)