如何在表中的唯一/主键被外部关键字引用的情况下drop表?
上一篇 /
下一篇 2008-05-13 14:25:15
/ 个人分类:总结
SQL> create table t (t1 int primary key);
Table created.
SQL> create table t1 (t1 int,t2 varchar2(20));
Table created.
SQL> alter table t1 add constraint frg_t1 foreign key (t1) references t;
Table altered.
SQL> drop table t;
drop table t
*
ERROR at line 1:
ORA-02449: unique/primary keys in table referenced by foreign keys
SQL> drop table t cascade constraints;
Table dropped.
导入论坛
引用链接
收藏
分享给好友
推荐到圈子
管理
举报
TAG: