Alter column PSQL

Note: spend more time on the database structure in the first place.

ALTER TABLE product
  ADD COLUMN product_price
  CHARACTER VARYING(8)
  NOT NULL
  DEFAULT 0;

and don't forget to

UPDATE product SET product_price=0;

Oh crap too small

ALTER TABLE product
  ALTER COLUMN product_price
  TYPE CHARACTER VARYING(64);

Posted 24 Apr 2008, tagged with postgresql sql