List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:August 16 2000 11:44am
Subject:Re: changeing tables from dynamic to static
View as plain text  
At 12:09 PM +0100 2000-08-16, Arne Mueller wrote:
>Hi All,
>
>I've changed a column in a table from varchar(50) to char(12) via the
>ALTER command but mysql did a silent column change to varchar(12). I
>think this is because the table was dynamic (the varchar(50) column was
>the only variable length column). I do want this table static. How can I
>force mysql to change this colum to char and to change the table from
>dynamic to static? Is there a faster way than dumping the table into a
>text file and then reload it from that text file with a fresh table
>specification (the table conatins ~100 Mio rows).

If you want to do it with ALTER TABLE, you'll need to change all your
VARCHAR columns to CHAR at the same time.  You can do this because
ALTER TABLE allows you to change multiple columns in the same statement.
See the manual for the syntax.

-- 
Paul DuBois, paul@stripped
Thread
changeing tables from dynamic to staticArne Mueller16 Aug
  • Re: changeing tables from dynamic to staticsinisa16 Aug
  • Re: changeing tables from dynamic to staticPaul DuBois16 Aug
  • Re: changeing tables from dynamic to staticArne Mueller16 Aug
    • Re: changeing tables from dynamic to staticsinisa17 Aug
  • Re: changeing tables from dynamic to staticArne Mueller17 Aug
    • Re: changeing tables from dynamic to staticsinisa18 Aug
Re: changeing tables from dynamic to staticEd Carp16 Aug
  • Re: changeing tables from dynamic to staticClaude Cormier16 Aug
Re: changeing tables from dynamic to staticEd Carp16 Aug