Won't accept any Table Name using MSSMS?

I am trying to setup a new table and I forgot to state a Database name, so it went into the master table. As I did not want it there I deleted it and then included the correct database, but now it says that there is an object with that name already. So I though I'll call it something different, but it still says there is an object of that name?

I have also tried to create another table and the same thing happens!

Why is this happening?

Here is the SQL statement:

USE Verses_Find
GO

IF OBJECT_ID('Sub_Event', 'U') IS NOT NULL
DROP TABLE Event_Type
GO

CREATE TABLE Sub_Event
(
SID INT IDENTITY(1,1),
Event_Sub varchar(20) NOT NULL,
CONSTRAINT Sub_Event PRIMARY KEY(SID),
)

GO

Your DROP has a different table name than the CREATE :-).

1 Like