I try a lot of commands to disable tables constraints in my database to make truncate to all tables but still now it give me the same error:
Cannot truncate table '' because it is being referenced by a FOREIGN KEY constraint.
I try
EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all"
EXEC sp_MSforeachtable "TRUNCATE TABLE ?"
And I tried this for each table
ALTER TABLE [Table Name] NOCHECK CONSTRAINT ALL
truncate table [Table Name]
ALTER TABLE [Table Name] CHECK CONSTRAINT ALL
and every time I have the previous error message. How can I solve this problem?