Re: Can we change the column width of a column in a live database?
Posted in 1998
On Thu, 24 Sep 1998, Saleem Mohammad wrote:
> Can we change the ( I have to increase the width of character
> filed in a table of a live database) width of a column in a
> live database??? Please let me know.
Yes:
ALTER TABLE WhichEver MODIFY (ColName CHAR(128) NOT NULL);
It will temporarily lock the table, of course. You'd also want to check
whether the alter will be done 'in place' or whether you'll need enough
space to duplicate the table with the new size, but the database system as
a whole does not have to go offline to do this. Also, if you have I4GL
programs, you'll probably need to recompile them with the revised schema.
And with D4GL programs, you'll need to regenerate the dbase.sch file before
doing the recompilation.
Yours,
Jonathan Leffler (jleffler@informix.com) #include <witticism.h>
Guardian of DBD::Informix v0.60 -- http://www.perl.com/CPAN
Informix IDN for D4GL & Linux -- http://www.informix.com/idn