List:General Discussion« Previous MessageNext Message »
From:Zak Greant Date:January 30 2003 10:15pm
Subject:Re: Dropping foreing key without losing data
View as plain text  
On Thu, Jan 30, 2003 at 10:08:08AM +0100, Webmaster LLBfrance wrote:
> Hello,
> 
> Can you tell me how to drop or desactivate a foreign key without
> losing any data in SQL for MySQL 3.23.51 ?

  Hello JeanClaude,

  Unfortunately, foreign keys cannot currently be conveniently dropped.
  :( The InnoDB developer plans to implement this in the near future.

  The only option currently is to recreate the table structure, move the
  data into the new table, drop the old table and then rename the table.

  Cheers!
-- 
 Zak Greant <zak@stripped> | MySQL Advocate |  http://zak.fooassociates.com

Developing Dynamic Web Applications with MySQL and PHP
  MySQL Training: San Francisco, February 03-07, 2003
  Visit http://mysql.com/training for more information

GNU/Free Software Foundation (http://www.gnu.org)
Thread
Dropping foreing key without losing dataWebmaster LLBfrance30 Jan
  • Re: Dropping foreing key without losing dataZak Greant30 Jan
    • RE : Dropping foreing key without losing dataWebmaster LLBfrance31 Jan
      • Re: RE : Dropping foreing key without losing dataZak Greant31 Jan