1、先关掉所有外键约束: SELECT 'alter table '|| t.table_name || ' disable constraint ' || t.CONSTRAINT_NAME || ';' FROM USER_CONSTRAINTS t WHERE t.CONSTRAINT_TYPE = 'R'; 2、导入dmp文件 3、开启所有外键约束: SELECT 'alter table '|| t.table_name || ' enable constraint ' || t.CONSTRAINT_NAME || ';' FROM USER_CONSTRAINTS t WHERE t.CONSTRAINT_TYPE = 'R';
转自:https://blog.csdn.net/u014601583/article/details/80332917