I have the following issue in SQL Server, I have some code that looks like this:
DROP TABLE #TMPGUARDIAN
CREATE TABLE #TMPGUARDIAN(
LAST_NAME NVARCHAR(30),
FRST_
Some times you may make silly mistakes like writing insert query on the same .sql file (in the same workspace/tab) so once you execute the insert query where your create query was written just above and already executed, it will again start executing along with the insert query.
This is the reason why we are getting the object name (table name) exists already, since it's getting executed for the second time.
So go to a separate tab to write the insert or drop or whatever queries you are about to execute.
Or else use comment lines preceding all queries in the same workspace like
CREATE -- …
-- Insert query
INSERT INTO -- …