ORA-02449:unique/primary keys in table referenced by foreign keys

Oracle 删除表的时候报错: ORA-02449:unique/primary keys in table referenced by foreign keys

原因是:外键引用的表中的唯一键/主键。
解决办法:

select * from user_constraints c where c.table_name=‘表名’;

alter table 表名 disable constraint 约束名 CASCADE;

drop table 表名 cascade constraints;

发布了50 篇原创文章 · 获赞 85 · 访问量 161万+

猜你喜欢

转载自blog.csdn.net/qq_24347541/article/details/90600742
今日推荐