List:General Discussion« Previous MessageNext Message »
From:Victoria Reznichenko Date:March 30 2004 8:47am
Subject:Re: Drop all keys / indexes on a table?
View as plain text  
"Daevid Vincent" <daevid@stripped> wrote:
> It has come to my attention that we have maxed out our keys due to a stupid
> update script bug. It seemst that we've not been explicitly naming our keys
> and therefore mysql tried to be helpful and adds a new key each time!
> *sigh*.
> 
> Is there a SQL command to DROP ALL keys on a table, so I can just ALTER it
> and add them specifically again?
> 

Specify several DROP INDEX clause in the single ALTER TABLE statement:
	ALTER TABLE table_name DROP INDEX index_name1, DROP INDEX index_name2, .. , DROP INDEX
index_nameN;


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   Victoria.Reznichenko@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




Thread
Drop all keys / indexes on a table?Daevid Vincent29 Mar
  • Re: Drop all keys / indexes on a table?Victoria Reznichenko30 Mar
    • RE: Drop all keys / indexes on a table?Daevid Vincent30 Mar
      • Re: Drop all keys / indexes on a table?PeterWR30 Mar
        • RE: Drop all keys / indexes on a table?Daevid Vincent30 Mar
          • Re: Drop all keys / indexes on a table?John Thorpe30 Mar
            • RE: Drop all keys / indexes on a table?Daevid Vincent31 Mar
      • using result as a fieldMojtaba Faridzad30 Mar
      • RE: Drop all keys / indexes on a table?Daevid Vincent30 Mar