Temp tables must have unique IDs (within the session, for local temp tables, or within the server, for global temp tables). Trying to create a table using a name that already exists will return the following error:
There is already an object named '#tempTable' in the database.
If your query pro...