ORA-01463: cannot modify column datatype with current constraint(s) ORACLE 报错 故障修复 远程处理
文档解释
ORA-01463: cannot modify column datatype with current constraint(s)
Cause: An attempt was made to modify the datatype of column which has referential constraints; or has check constraints which only allows changing the datatype from CHAR to VARCHAR or vise versa.
Action: Remove the constraint(s) or do not perform the offending operation.
ORA-01463:当前约束(s)无法修改列数据类型。
该错误消息表明尝试修改表中字段的数据类型,但表中存在约束条件,导致此操作无法完成。要修改列的数据类型,必须先删除约束条件。
ORACLE官方文档定义如下:
ORA-01463:无法使用当前约束(S)修改列数据类型。
发生此错误的常见情况是,某个字段由于唯一性约束而不能修改其数据类型。将删除仅改变列的约束,然后尝试重新修改字段的数据类型。
正常处理方法及步骤
1.使用SQL查找具有任何约束的列,如:
SELECT * FROM user_constraints WHERE table_name =
3.如果确实存在该列的约束,则使用如下语句删除该约束:
ALTER TABLE
2.检查Column Name所提供的列名,其是否与要改变其数据类型的列名匹配。
ALTER TABLE MODIFY
4.重新尝试修改列的数据类型:
香港美国云服务器首选后浪云,2H2G首月10元开通。
后浪云(www.IDC.Net)提供简单好用,价格厚道的香港/美国云服务器和独立服务器。IDC+ISP+ICP资质。ARIN和APNIC会员。成熟技术团队15年行业经验。