I got error “The DELETE statement conflicted with the REFERENCE constraint”
I tried to truncate a table with foreign keys and got the message: " Cannot truncate table because it is being referenced by a FOREIGN KEY constraint ". I read a lot of literature about the problem and thought that I found the solution by using delete DELETE FROM table_name DBCC CHECKIDENT (table_name, RESEED, 0) But I still got an error message: " The DELETE statement conflicted with the REFERENCE constraint ". When I try to delete with Microsoft Management Studio and execute the previous query DELETE FROM table_name DBCC CHECKIDENT (table_name, RESEED, 0) it doesn't give an error and works