数据库中表字段已存入数据,如何修改表字段的类型?
举例:修改列 updatecol
1新建一个列newcol
alter table SG_T_DAYPLAN_C add xiansu2 clob;
2把 updatecol值付给newcol
update SG_T_DAYPLAN_C set xiansu2=xiansu;
3删除 updatecol
alter table SG_T_DAYPLAN_C drop column xiansu;
alter table SG_T_DAYPLAN_C rename COLUMN xiansu2 to xiansu ;
笑图: