List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:August 13 1999 1:49pm
Subject:Re: Modify Table
View as plain text  
"Allen, Anthony" wrote:
> Can anyone help out!  I have a table with a column that I want to make NOT
> NULL,  There are over 475,000 records associated with this table.  The
> column in the table was populated with the attribute of being NULL by
> default.  I tried to do the following SQL command but it went for over 15
> hours and never completed the task so I killed the process.
> ALTER TABLE tablename
> MODIFY column_name
> varchar(255) NOT NULL;
> Can someone tell me if this is not the best way to do this.  I want to keep
> the integrity of the record info in that column but I just want the default
> to be NOT NULL.
> Thanks anyone for a response.
> Tony

Hi Tony

I assume you have a lot of indexes on this table.

You should drop dem first.
Then modify your table specification.
After that add your indexes again.


Modify TableAnthony Allen12 Aug
  • Re: Modify TableSasha Pachev13 Aug
  • Re: Modify TableChristian Mack13 Aug
    • gcc 2.95jgauthier13 Aug
      • gcc 2.95Michael Widenius21 Aug