No need to drop the foreign key constraint. Just disabling it for the duration of truncate operation and enabling it afterwards will be enough. So in your case:
Code:ALTER TABLE t2 DISABLE CONSTRAINT fk2; TRUNCATE TABLE t1 REUSE STORAGE; ALTER TABLE t2 ENABLE CONSTRAINT fk2;




Reply With Quote