Friday, 19 July 2013

we cannot truncate table without drop foreign key constraints

Yes, we can not truncate table without dropping foreign key constraints.

we can not truncate table if it is referenced by foreign key constraint, but we can delete all records in it.

Follow steps to truncate table -
1. Drop Constraints  (dropping constraint is necessary because Disable constraint wont work.)
2. Truncate Table
3. Add Constraints




No comments:

Post a Comment