SQL> truncate table USERINFO;
truncate table USERINFO
*
ERROR at line 1:
ORA-02266: unique/primary keys in table referenced by enabled foreign keys我记得还要加个什么命令就不用管约束了??
truncate table USERINFO
*
ERROR at line 1:
ORA-02266: unique/primary keys in table referenced by enabled foreign keys我记得还要加个什么命令就不用管约束了??
个被其它表通过FOREIGN KEY约束所参照的表。
楼主记错了吧,在drop子句里有cascade contraints,如:
drop table t cascade constraints;
先truncate 子表
再truncate 父表
可以用脚本,或动态sql...
alter table t disable constraint "约束名"
然后truncate table t;
OK!
谢谢了哈.我过后想起了.
我重建表了^_^