I use a lot of temporary tables in my scripts - tables like #tablename.
When I rerun the script, I get error messages that they already exist.
I have tried doing a
Code:
DROP TABLE #tablename
I then get an error message that they do not exist.
How can I test for the existence of the temporary tables before doing the DROP TABLE command?
All the code I've seen so far only works for permanent tables.