举例:修改列 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;

4把newcol更名为updatecol

alter table SG_T_DAYPLAN_C rename COLUMN  xiansu2 to xiansu ;

笑图:

数据库中表字段已存入数据,如何修改表字段的类型?

相关文章: