Log in

View Full Version : droping INDEX problem...


TECK
09-29-2002, 12:33 AM
ALTER TABLE `sometable` ADD INDEX (`someid`)
any idea why i get an sql error?
to create it, i used:
ALTER TABLE `sometable` DROP INDEX (`someid`)

i also tried this way:
ALTER TABLE sometable ADD INDEX (someid)
and:
ALTER TABLE sometable DROP INDEX (someid)

TECK
09-29-2002, 01:08 AM
the error i get is this:
Database error in vBulletin Control Panel 2.2.8:

Invalid SQL: ALTER TABLE sometable DROP INDEX (someid)
mysql error: You have an error in your SQL syntax near '(someid)' at line 1

i also tried:
DROP INDEX (someid) ON sometable

Freddie Bingham
09-29-2002, 05:10 AM
ALTER TABLE sometable DROP INDEX someid

TECK
09-29-2002, 05:18 AM
i tried that to. it wont work freddie... i get an error like is not there:
Database error in vBulletin Control Panel 2.2.8:

Invalid SQL: ALTER TABLE sometable DROP INDEX someid
mysql error: Can't DROP 'someid'. Check that column/key exists

i create it, i know for sure, with:
ALTER TABLE sometable ADD INDEX (someid)

Neo
09-29-2002, 08:22 AM
What Freddie posted worked for me. Just make sure what you are dropping has been INDEXed.