ORA-01451: column to be modified to NULL cannot be modified to NULL

  • A+
所属分类:Blog Database Oracle

今天来了一个需求,修改摸个字段为null值,原先是不为空的;

执行sql:alter table MED_OVAL_ASS_D modify mkg_ptr_cd null;

报错:ORA-01451: column to be modified to NULL cannot be modified to NULL

最后发现是因为这个字段是联合主键,不能直接修改为null,

删除联合主键即可直接修改,记录一下!

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: