ORA-01439: column to be modified must be empty to change datatype
2013-12-16 18:38
561 查看
今天在做字段类型更改的时候碰到一个错误:
ORA-01439: column to be modified must be empty to change datatype
(更改数据类型的列必须为空)
但我里面有数据,现将解决方法笔记下来: 增加临时列来处理.
T1 (t1 nvarchar2(100), t2 number(100));
有个表T1,需要将t1列的类型改为t1 varchar2(100).
alter table T1 add t1_tmp nvarchar2(100);
update T1 set t1_tmp=t1;
update T1 set t1=null;
alter table T1 modify t1 varchar2(100);
update T1 set t1=t1_tmp;
alter table T1 drop column t1_tmp;
ORA-01439: column to be modified must be empty to change datatype
(更改数据类型的列必须为空)
但我里面有数据,现将解决方法笔记下来: 增加临时列来处理.
T1 (t1 nvarchar2(100), t2 number(100));
有个表T1,需要将t1列的类型改为t1 varchar2(100).
alter table T1 add t1_tmp nvarchar2(100);
update T1 set t1_tmp=t1;
update T1 set t1=null;
alter table T1 modify t1 varchar2(100);
update T1 set t1=t1_tmp;
alter table T1 drop column t1_tmp;
相关文章推荐
- ORA-01439: column to be modified must be empty to change datatype
- ORA-01439: column to be modified must be empty to change datatype
- ora-01440:column to be modified must be empty to decrease precision or scale
- ORA-01440: column to be modified must be empty to decrease precision or scale
- ORA-01758: table must be empty to add mandatory (NOT NULL) column
- 修改表字段,column to be modified must be empty
- ORA-01442: column to be modified to NOT NULL is already NOT NULL
- Thread: alter varchar2 column to clob // ORA-22858: invalid alteration of datatype
- oracle : olumn to be modified must be empty to decrease precision or scale
- ORA-54033要修改的列由某个虚拟表达式使用column to be modified is used in a virtual column expression
- ORA-01442: column to be modified to NOT NULL is already NOT NULL
- Attribute "column" must be declared for element type "property"解决办法
- ORA-00607: Internal error occurred while making a change to a data block
- According to TLD, tag s:property must be empty
- 异常:According to TLD tag beanwrite must be empty but is not
- could not be set to a 'string' value. You must set this property to a non-null value of type
- EXP-00008: ORA-01455: converting column overflows integer datatype
- datatype强制性改变,提示TypeError: only length-1 arrays can be converted to Python scalars
- Unable to determine the principal end of an association between the types '***. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations.
- The type of the expression must be an array type but it resolved to Point