• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3936
  • Last Modified:

SQLCE Drop Unique Index

Hi,

I created a unique index in SQLCE using "CREATE UNIQUE INDEX "idxABC" ON "ABC"". Now I want to drop this index, may I know how do I do that?

I tried "DROP INDEX "ABC.idxABC"", doesn't work. The document says it won't work on PRIMARY KEY or UNIQUE INDEX anyway.

I tried "ALTER TABLE "ABC" DROP CONSTRAINT "idxABC"", doesn't work too.

What should I do? Thanks in advance!
0
yeewee64
Asked:
yeewee64
  • 3
  • 2
1 Solution
 
Mikal613Commented:
try

ALTER TABLE 'ABC' DROP CONSTRAINT 'idxABC'

or

ALTER TABLE ABC DROP CONSTRAINT idxABC
0
 
yeewee64Author Commented:
Hi Mikal613,

Thanks for the response. I've found the answer already. It's just "DROP INDEX ABC.idxABC", without the single or double quotes around the index name :S.

And I think the document was referring to PRIMARY KEY or UNIQUE constraint made to table or column that requires ALTER TABLE DROP CONSTRAINT.


0
 
Mikal613Commented:
hence

ALTER TABLE ABC DROP CONSTRAINT idxABC

:)
0
 
yeewee64Author Commented:
Hi Mikal613,

I tried "ALTER TABLE ABC DROP CONSTRAINT idxABC", it didn't work. I think that's because I used "CREATE INDEX" to create it.

So far, only "DROP INDEX" works for me. So I don't think I can set your comment as the answer to this question. Do you mind if I close this question and get a refund? I mean, as far as I know, experts-exchange only give me two options, to give all 195 points or 0 point to you. I wish I could give half the points to you for attempting to answer my question, and your answer was pretty close too.

0
 
Mikal613Commented:
post this in commnity support
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now