begin; alter table web_child add column strnum varchar(10); update web_child set strnum = to_char(schoolstd,'999'); alter table web_child alter column strnum set not null; alter table web_child drop column schoolstd; alter table web_child rename column strnum to schoolstd; commit;