We help IT Professionals succeed at work.

SQLCE Drop Unique Index

yeewee64
yeewee64 asked
on
Medium Priority
4,115 Views
Last Modified: 2013-11-18
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!
Comment
Watch Question

CERTIFIED EXPERT

Commented:
try

ALTER TABLE 'ABC' DROP CONSTRAINT 'idxABC'

or

ALTER TABLE ABC DROP CONSTRAINT idxABC

Author

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.


CERTIFIED EXPERT
Commented:
hence

ALTER TABLE ABC DROP CONSTRAINT idxABC

:)

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

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.

CERTIFIED EXPERT

Commented:
post this in commnity support
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.