When I run this query
ALTER TABLE "dbo"."ROOM" DROP INDEX "UNIQUE";
I got this message:
Error 1018: Incorrect syntax near 'INDEX'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax.
The name of the unique index is, justly, UNIQUE
. I think that is the problem, and it's an autogenerated name (for the SQL Server client that was used to create this index). This is the create table sentence:
CREATE TABLE "ROOM" (
"ID" BIGINT NOT NULL DEFAULT NULL,
//the rest of the columns...
"ROOM" VARCHAR(100),
UNIQUE INDEX "UNIQUE" ("ROOM")
)
;
Any idea how can I remove this index? I know I can drop the table, and create it again, I want to avoid that.
idx_room_room
, oridxu_room_room
for the index name. – Weinhardt