Delete -is a logged operation on a per row basis , this means that the deletion of each row gets logged and physically deleted. You can delete any row that will not violate a constraint,while leaving the foreign key or any other constraint in place.Truncate-is also a logged operation but in different way.Truncate logs the deallocation of the data pages in which the data exists. The deallocation of data pages means that your data rows still actuallyexists in the data pages but the extend have been marked as empty for reuse this is what makes truncate a faster operation over delete. you can not truncate a table that has any foreign key constraint . you will have to remove the constraint , truncate the table and reapply the constraint..
C# Corner. All contents are copyright of their authors.