ORA-01439: column to be modified must be empty to change datatype
来源:互联网 发布:linux sap systemcopy 编辑:程序博客网 时间:2024/05/18 22:44
修改数据库字段类型,但是由于数据表已经存在数据,无法修改;
显示错误:ORA-01439: column to be modified must be empty to change datatype
alter table USERS add tmp_col NUMBER(1);-- 添加临时列update USERS set tmp_col = CUSTOMER_MARITAL_STATUS ; --将目标字段中数据加入到临时列中update USERS set CUSTOMER_MARITAL_STATUS = null; --将目标字段数据清空alter table USERS modify ( CUSTOMER_MARITAL_STATUS NUMBER(1)); --更改目标字段类型update USERS set CUSTOMER_MARITAL_STATUS = tmp_col; --将临时列数据加回到目标字段中alter table USERS drop column tmp_col; --清除临时列SELECT DISTINCT CUSTOMER_MARITAL_STATUS FROM USERS;SELECT DISTINCT tmp_col FROM USERS;
0 0
- 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-01758: table must be empty to add mandatory (NOT NULL) column
- oracle : olumn to be modified must be empty to decrease precision or scale
- 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
- According to TLD, tag bean:write must be empty
- According to TLD, tag s:property must be empty
- C++ Interview Questions (to be modified...)
- According to TLD, tag bean:write must be empty, but is not
- struts标签相关错误:According to TLD, tag bean:write must be empty, but is not
- According to TLD, tag bean:write must be empty, but is not问题原因
- According to TLD, tag jsp:getProperty must be empty, but is not
- According to TLD, tag s:property must be empty, but is not
- According to TLD, tag fmt:formatDate must be empty, but is not 问题的解决
- 异常:According to TLD tag beanwrite must be empty but is not
- According to TLD, tag bean:message must be empty, but is not
- org.apache.jasper.JasperException According to TLD, tag form:input must be empty, but is not
- Java统计程序运行时间(转)
- ubuntu9.10与fl2440 NFS问题
- 使用bash命令,普通用户登陆无法使用tab补全或显示不正常
- 通向架构师的道路(第三天)之apache性能调优
- TOP命令中内存解析
- ORA-01439: column to be modified must be empty to change datatype
- 教你如何用Qt做透明的窗体,setMask,Qt,Opacity
- VS2008安装WTL项目模板
- POSTGIS简介
- jQuery select操作控制方法
- OCLint静态语法分析工具(安装使用步骤)
- MyEclipse的安装和汉化过程
- BroswerMode/DocumentMode/CompatMode/ 浏览器模式,文档模式,渲染模式
- 通向架构师的道路(第四天)之Tomcat性能调优-让小猫飞奔