I have a process that adds some data to a database. Some of the columns are keys. I need to be able to delete the row once the process runs (so I can run it again). However Im getting the following error:
Msg 547, Level 16, State 0, Line 1 The DELETE statement conflicted
with the REFERENCE constraint “FK_InviteConfiguration_Invite”. The
conflict occurred in database “Unilever”, table
“dbo.InviteConfiguration”, column ‘InviteID’. The statement has been
terminated.
I see that there are some keys set with references between the tables how do I just force the deletion anyway?
You can do this, but its probably better just to update or delete the rows in the referencing table
or with a slightly smaller hammer