I am using the following code to check if the temporary table exists and drop the table if it exists before creating again. It works fine as long as I don\'t change the colu
This worked for me,
IF OBJECT_ID('tempdb.dbo.#tempTable') IS NOT NULL DROP TABLE #tempTable;
Here tempdb.dbo(dbo is nothing but your schema) is having more importance.