ORA-01439: column to be modified must be empty to change datatype
修改数据库字段类型,但是由于数据表已经存在数据,无法修改;
显示错误:
修改方法:
- alter table web_app_base add tmp_col varchar2(3999);-- 添加临时列
- update web_app_base set tmp_col = C_EDR_CTNT ; --将目标字段中数据加入到临时列中
- update web_app_base set C_EDR_CTNT = null; --将目标字段数据清空
- alter table web_app_base modify (C_EDR_CTNT long); --更改目标字段类型
- update web_app_base set C_EDR_CTNT = tmp_col; --将临时列数据加回到目标字段中
- alter table web_app_base drop column tmp_col; --清除临时列
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
在修改表字段的NUMBER类型的精度或刻度时,你可能会遇到ORA-01440: column to be modified must be empty to decrease precision or ...
- Oracle中表列由VARCHAR2类型改成CLOB
情景 原来表中的列定义成VARCHAR2类型,众所周知,VARCHAR2类型最大支持长度为4000.假设因为业务须要.想把此列转换为CLOB类型,在Oracle中直接通过ALTER语句转换是行不通的. ...
- Oracle对列的操作总结
1.更改列名 alter table TABLE_NAME rename column COLUMN_OLD COLUMN_NEW; 2.添加列 alter table TABLE_NAME add ...
- Oracle中字段的修改操作语法
对字段操作 操作方法 更新字段名 alter table TABLE_NAME rename column column_old to column_new; 添加字段 alter table T ...
- oracle数据库中修改已存在数据的字段
在oracle中,如果已经存在的数据的某些列,假如要更换类型的话,有的时候是比较麻烦的, 会出现:ORA-01439: column to be modified must be empty to c ...
- Oracle 如何修改列的数据类型
链接:http://www.cnblogs.com/david-zhang-index/archive/2012/04/10/2441015.html 对字段操作 操作方法 更新字段名 alter t ...
- oracle修改已存在数据的字段类型
第一次使用oracle数据库,在通过Navicat premium工具修改字段类型时,发现报“ORA-01439: column to be modified must be empty to cha ...
- [Hive - LanguageManual] Alter Table/Partition/Column
Alter Table/Partition/Column Alter Table Rename Table Alter Table Properties Alter Table Comment Add ...
- Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column is set to 0.
1: /// <summary> 2: /// Write an algorithm such that if an element in an MxN matrix is 0, it ...
随机推荐
- 通过前台选择输入用来计算圆,三角形以及长方形的面积(此题目主要是while以及if 的使用)
#!/bin/usr/env python#coding=utf-8'''完成一段简单的Python程序,用于实现计算圆面积,三角形面积,长方形面积'''flag=Truewhile flag: pi ...
- IntelliJ Idea 常用快捷键 列表(实战终极总结!!!!)
IntelliJ Idea 常用快捷键 列表(实战终极总结!!!!) 1. -----------自动代码-------- 常用的有fori/sout/psvm+Tab即可生成循环.System.ou ...
- 四、Spring——Spring MVC
Spring MVC 1.Spring MVC概述 Spring MVC框架围绕DispatcherServlet这个核心展开,DispatcherServlet负责截获请求并将其分配给响应的处理器处 ...
- mpstat, pidstat, iostat和sar
在我们上一篇文章中,我们已经学习了如何去安装和更新sysstat,并且了解了包中的一些实用工具. 今天,我们将会通过一些有趣的实例来学习mpstat, pidstat, iostat和sar等工具,这 ...
- Unity2D多分辨率屏幕适配方案(转载)
一下内容转自:http://imgtec.eetrend.com/forum/3992 此文将阐述一种简单有效的Unity2D多分辨率屏幕适配方案,该方案适用于基于原生开发的Unity2D游戏,即没有 ...
- StringIO学习
StringIO StringIO的行为与file对象非常像,但它不是磁盘上文件,而是一个内存里的“文件”,我们可以将操作磁盘文件那样来操作StringIO.一个简单的例子,让你对StringIO有一 ...
- Sonar升级遇到的那些事儿
目录 背景 如何升级 如何回滚 问题解决 参考 背景 目前我们用SonarQube版本是4.0,这次准备升级到最新版本5.1, 以便支持以后的JavaScript的项目. 如何升级 我们可以直接跨越版 ...
- 40. Interleaving String
Interleaving String Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. Fo ...
- win32手动创建windows窗口的,小记
摘抄自文档,其中的函数需要以后花时间看 向 WinMain 添加功能 首先,在 WinMain 函数内部创建 WNDCLASSEX 类型的窗口类结构. 此结构包含有关窗口的信息,如应用程序图标.窗口的 ...
- C#全角、半角转换
全角:指一个字符占用两个标准字符位置:半角:指一字符占用一个标准的字符位置. using System; using System.Collections.Generic; using System. ...