Oracle中已有数据的字段类型修改 关联字段

修改Oracle中数据库--字段属性信息

先修改从表

alter table ZHCX_CSCX_GLBXS rename column GLZDID to myGLZDID;
alter table ZHCX_CSCX_GLBXS add GLZDID VARCHAR2(30);
update ZHCX_CSCX_GLBXS set GLZDID = myGLZDID;
alter table ZHCX_CSCX_GLBXS drop column myGLZDID;

 

再修改主表

alter table ZHCX_CSCX_GLZD rename column GLZDID to myGLZDID;
alter table ZHCX_CSCX_GLZD add GLZDID VARCHAR2(30);
update ZHCX_CSCX_GLZD set GLZDID = myGLZDID;
alter table ZHCX_CSCX_GLZD drop column myGLZDID;

posted @ 2014-12-02 17:25  博客园董事长  阅读(305)  评论(0编辑  收藏  举报