On Tuesday 15 Apr 2003 10:36 am, Vitali Djatsuk wrote:
> Hi,
>
> How can I change a data type in column ?
Well, the closest you could get would be something like:
ALTER TABLE RENAME column TO backup_column;
ALTER TABLE ADD COLUMN column ...;
...copy and transform data...
ALTER TABLE DROP COLUMN backup_column;
Personally, I tend to dump/recreate the table where possible, but I might be a
little paranoid there.
I think you'll need to recreate any triggers/FK's in either case.
--
Richard Huxton