nc修改表字段
2015-08-07 17:13
393 查看
备份式修改:
--修改原字段名def1为def1_tmp
alter table srmsm_supplierext_p rename column def1 to def1_tmp;
--增加一个和原字段名同名的字段def1
alter table srmsm_supplierext_p add def1 varchar(4000);
--将原字段def1_tmp数据更新到增加的字段def1
update srmsm_supplierext_p set def1=trim(def1_tmp);
--更新完,删除原字段def1_tmp
alter table srmsm_supplierext_p drop column def1_tmp;
非备份式修改:
alter table fa_transasset_b modify(def1 varchar2(500));
commit;
update md_column t set t.columnlength=500
where t.tableid='fa_transasset_b' and t.name='def1';
commit;
update md_property t set t.attrlength =500
where t.classid in
(select c.id from md_class c
where c.defaulttablename='fa_transasset_b') and t.name='def1';
commit;
相关文章推荐
- 维护网站小笔记
- VS2013如何添加LIb库及头文件的步骤
- 【三】8 与Service通信
- 在Windows下配置MinGW编译环境和Code::Blocks编辑器
- C 函数参数-传值和传址
- ACM对拍程序
- 讲解 Ioc 控制反转和 AOP 的文章(转载)
- Android MenuItem 设置文字颜色-TextColor的设置
- Android 自定义ViewGroup 实现FlowLayout
- linux用户态和内核态理解
- angularjs三级联动
- (转)数据索引BTree
- 9.1——顺序容器,迭代器,顺序容器操作
- 防止windows自动删除MEMORY.DMP
- 2015年8月初iOS 8安装率碾压Android 5.0
- 升级gcc到4.8.2
- Linux的sleep()和usleep()
- Linux的sleep()和usleep()
- Android 软键盘盖住输入框的问题
- java 泛型编程(一)