If you try to truncate a table that is referenced by foreign key you usually get the following error:
Cannot truncate table 'TableName' because it is being referenced by a FOREIGN KEY constraint.
To avoid this error the easiest way to use DELETE without where clause and RESEED the identity:
DELETE FROM AccVoucher
DBCC CHECKIDENT (AccVoucher, RESEED, 0)
Debugging my new network, when 10 Gigabit Ethernet Runs at 300 Megabits
-
I've been moving my home storage over to a UniFi UNAS Pro 8 as part of a
larger homelab moderization. My main IRONHEART (the ultimate PC from a few
years...
2 days ago

No comments:
Post a Comment