On Sun, 2005-11-06 at 01:12 +0000, Chris wrote:
> I'm trying to change a char(30) to varchar(64), but I can't find a way to do it.
> I select the table, select properties, select the column and click change, but
> the data type and lengths are grayed out.
>
> How do I change this column from char(30) to varchar(64)?
Does this work (replace the names according to your schema)?
BEGIN;
ALTER TABLE table_name ADD COLUMN new_column varchar(64)?;
UPDATE table_name SET new_column = column;
ALTER TABLE customer RENAME column TO old_column;
ALTER TABLE customer RENAME new_column TO columns;
COMMIT;
--
Groeten,
Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl