ora-01440:column to be modified must be empty to decrease precision or scale
2013-05-22 13:06
429 查看
问题缘由:
客户要求某个字段支持小数点,数据库一开始设计的时候只支持整数,在通过alert语句修改类型,出现了ora-001440的错误,
解决办法
step1:备份原来的表,
create table WF_TEACHER_REMUNERATION_BAK
as select * from WF_TEACHER_REMUNERATION;
step2:删除原来表的数据
delete from
WF_TEACHER_REMUNERATION
;
step3:修改精度
ALTER TABLE "DHOFFICE"."WF_TEACHER_REMUNERATION"
MODIFY ( "CLASS_TIME" NUMBER(10,2) ) ;
step4:恢复数据
insert into
WF_TEACHER_REMUNERATION
select * from
WF_TEACHER_REMUNERATION_BAK
;
step by step ,打完毕,收工!
客户要求某个字段支持小数点,数据库一开始设计的时候只支持整数,在通过alert语句修改类型,出现了ora-001440的错误,
解决办法
step1:备份原来的表,
create table WF_TEACHER_REMUNERATION_BAK
as select * from WF_TEACHER_REMUNERATION;
step2:删除原来表的数据
delete from
WF_TEACHER_REMUNERATION
;
step3:修改精度
ALTER TABLE "DHOFFICE"."WF_TEACHER_REMUNERATION"
MODIFY ( "CLASS_TIME" NUMBER(10,2) ) ;
step4:恢复数据
insert into
WF_TEACHER_REMUNERATION
select * from
WF_TEACHER_REMUNERATION_BAK
;
step by step ,打完毕,收工!
相关文章推荐
- ORA-01440: column to be modified must be empty to decrease precision or scale
- oracle : olumn to be modified must be empty to decrease precision or scale
- 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-01439: column to be modified must be empty to change datatype
- ORA-01758: table must be empty to add mandatory (NOT NULL) column
- 修改表字段,column to be modified must be empty
- ORA-54033要修改的列由某个虚拟表达式使用column to be modified is used in a virtual column expression
- tomcat 7 WARNING: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to []
- Name for parameter binding must not be null or empty! On JDKs < 8, you need to use @Param for named
- ORA-01442: column to be modified to NOT NULL is already NOT NULL
- ORA-01442: column to be modified to NOT NULL is already NOT NULL
- ssh服务启动失败 /var/empty must be owned by root and not group or world-writable.
- java.sql.SQLException: ORA-01799: a column may not be outer-joined to a subquery
- eclipse启动时提示 A Java Runtime Environment or Java Development Kit must be available to run Eclipse
- Row index must be greater than or equal to zero and less than the number of rows.
- A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Ecl
- 重启SSH报错 /var/empty/sshd must be owned by root and not group or world-writable.
- must be caught or declared to be thrown
- path must be absolute or specify root to res.sendF